Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.minecraft.network
Class MemoryConnection

    java.lang.Object
      net.minecraft.network.MemoryConnection

All Implemented Interfaces:
  INetworkManager

    public class MemoryConnection

extends Object
implements INetworkManager

Constructor Summary
`MemoryConnection(NetHandler par1NetHandler)`

Method Summary
`void` | `addToSendQueue(Packet par1Packet)` Adds the packet to the correct send queue (chunk data packets go to a separate queue).
`void` | `closeConnections()`
`MemoryConnection` | `getPairedConnection()`
`SocketAddress` | `getSocketAddress()` Return the InetSocketAddress of the remote endpoint
`boolean` | `isConnectionActive()`
`boolean` | `isGamePaused()`
`void` | `networkShutdown(String par1Str, Object... par2ArrayOfObj)` Shuts down the network with the specified reason.
`int` | `packetSize()` returns 0 for memoryConnections
`void` | `pairWith(MemoryConnection par1MemoryConnection)`
`void` | `processOrCachePacket(Packet par1Packet)` acts immiditally if isWritePacket, otherwise adds it to the readCache to be processed next tick
`void` | `processReadPackets()` Checks timeouts and processes all pending read packets.
`void` | `serverShutdown()` Shuts down the server.
`void` | `setGamePaused(boolean par1)`
`void` | `setNetHandler(NetHandler par1NetHandler)` Sets the NetHandler for this NetworkManager.
`void` | `wakeThreads()` Wakes reader and writer threads

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MemoryConnection

    public MemoryConnection(NetHandler par1NetHandler)
                     throws IOException

Throws:
  `IOException`

Method Detail

### 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`

### wakeThreads

    public void wakeThreads()

  Wakes reader and writer threads

  Specified by:
    `wakeThreads` in interface `INetworkManager`

### closeConnections

    public void closeConnections()

  Specified by:
    `closeConnections` in interface `INetworkManager`

### isConnectionActive

    public boolean isConnectionActive()

### processReadPackets

    public void processReadPackets()

  Checks timeouts and processes all pending read packets.

  Specified by:
    `processReadPackets` in interface `INetworkManager`

### getSocketAddress

    public SocketAddress getSocketAddress()

  Return the InetSocketAddress of the remote endpoint

  Specified by:
    `getSocketAddress` 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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD