Class MemoryConnection

java.lang.Object
net.minecraft.src.MemoryConnection
All Implemented Interfaces:
INetworkManager

public class MemoryConnection extends Object implements INetworkManager
  • Constructor Details

    • MemoryConnection

      public MemoryConnection(ILogAgent par1ILogAgent, NetHandler par2NetHandler)
  • Method Details

    • setNetHandler

      public void setNetHandler(NetHandler par1NetHandler)
      Sets the NetHandler for this NetworkManager. Server-only.
      Specified by:
      setNetHandler in interface INetworkManager
    • addToSendQueue

      public void addToSendQueue(Packet par1Packet)
      Adds the packet to the correct send queue (chunk data packets go to a separate queue).
      Specified by:
      addToSendQueue in interface INetworkManager
    • closeConnections

      public void closeConnections()
      Specified by:
      closeConnections in interface INetworkManager
    • isConnectionActive

      public boolean isConnectionActive()
    • wakeThreads

      public void wakeThreads()
      Wakes reader and writer threads
      Specified by:
      wakeThreads in interface INetworkManager
    • processReadPackets

      public void processReadPackets()
      Checks timeouts and processes all pending read packets.
      Specified by:
      processReadPackets in interface INetworkManager
    • getRemoteAddress

      public SocketAddress getRemoteAddress()
      Return the InetSocketAddress of the remote endpoint
      Specified by:
      getRemoteAddress in interface INetworkManager
    • serverShutdown

      public void serverShutdown()
      Shuts down the server. (Only actually used on the server)
      Specified by:
      serverShutdown in interface INetworkManager
    • networkShutdown

      public void networkShutdown(String par1Str, Object... par2ArrayOfObj)
      Shuts down the network with the specified reason. Closes all streams and sockets, spawns NetworkMasterThread to stop reading and writing threads.
      Specified by:
      networkShutdown in interface INetworkManager
    • packetSize

      public int packetSize()
      returns 0 for memoryConnections
      Specified by:
      packetSize in interface INetworkManager
    • pairWith

      public void pairWith(MemoryConnection par1MemoryConnection)
    • isGamePaused

      public boolean isGamePaused()
    • setGamePaused

      public void setGamePaused(boolean par1)
    • getPairedConnection

      public MemoryConnection getPairedConnection()
    • processOrCachePacket

      public void processOrCachePacket(Packet par1Packet)
      acts immiditally if isWritePacket, otherwise adds it to the readCache to be processed next tick