Package net.minecraft.src
Class MemoryConnection
java.lang.Object
net.minecraft.src.MemoryConnection
- All Implemented Interfaces:
INetworkManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToSendQueue(Packet par1Packet) Adds the packet to the correct send queue (chunk data packets go to a separate queue).voidReturn the InetSocketAddress of the remote endpointbooleanbooleanvoidnetworkShutdown(String par1Str, Object... par2ArrayOfObj) Shuts down the network with the specified reason.intreturns 0 for memoryConnectionsvoidpairWith(MemoryConnection par1MemoryConnection) voidprocessOrCachePacket(Packet par1Packet) acts immiditally if isWritePacket, otherwise adds it to the readCache to be processed next tickvoidChecks timeouts and processes all pending read packets.voidShuts down the server.voidsetGamePaused(boolean par1) voidsetNetHandler(NetHandler par1NetHandler) Sets the NetHandler for this NetworkManager.voidWakes reader and writer threads
-
Constructor Details
-
MemoryConnection
-
-
Method Details
-
setNetHandler
Sets the NetHandler for this NetworkManager. Server-only.- Specified by:
setNetHandlerin interfaceINetworkManager
-
addToSendQueue
Adds the packet to the correct send queue (chunk data packets go to a separate queue).- Specified by:
addToSendQueuein interfaceINetworkManager
-
closeConnections
public void closeConnections()- Specified by:
closeConnectionsin interfaceINetworkManager
-
isConnectionActive
public boolean isConnectionActive() -
wakeThreads
public void wakeThreads()Wakes reader and writer threads- Specified by:
wakeThreadsin interfaceINetworkManager
-
processReadPackets
public void processReadPackets()Checks timeouts and processes all pending read packets.- Specified by:
processReadPacketsin interfaceINetworkManager
-
getRemoteAddress
Return the InetSocketAddress of the remote endpoint- Specified by:
getRemoteAddressin interfaceINetworkManager
-
serverShutdown
public void serverShutdown()Shuts down the server. (Only actually used on the server)- Specified by:
serverShutdownin interfaceINetworkManager
-
networkShutdown
Shuts down the network with the specified reason. Closes all streams and sockets, spawns NetworkMasterThread to stop reading and writing threads.- Specified by:
networkShutdownin interfaceINetworkManager
-
packetSize
public int packetSize()returns 0 for memoryConnections- Specified by:
packetSizein interfaceINetworkManager
-
pairWith
-
isGamePaused
public boolean isGamePaused() -
setGamePaused
public void setGamePaused(boolean par1) -
getPairedConnection
-
processOrCachePacket
acts immiditally if isWritePacket, otherwise adds it to the readCache to be processed next tick
-