net.minecraft.network

## Interface INetworkManager

- All Known Implementing Classes:
    MemoryConnection, TcpConnection

      public interface INetworkManager

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addToSendQueue(Packet packet)` Adds the packet to the correct send queue (chunk data packets go to a separate queue).
    `void` | `closeConnections()`
    `SocketAddress` | `getSocketAddress()` Return the InetSocketAddress of the remote endpoint
    `void` | `networkShutdown(String s, Object... var2)` Shuts down the network with the specified reason.
    `int` | `packetSize()` returns 0 for memoryConnections
    `void` | `processReadPackets()` Checks timeouts and processes all pending read packets.
    `void` | `serverShutdown()` Shuts down the server.
    `void` | `setNetHandler(NetHandler nethandler)` Sets the NetHandler for this NetworkManager.
    `void` | `wakeThreads()` Wakes reader and writer threads

- - ### Method Detail

    - #### setNetHandler

          void setNetHandler(NetHandler nethandler)

      Sets the NetHandler for this NetworkManager. Server-only.

    - #### addToSendQueue

          void addToSendQueue(Packet packet)

      Adds the packet to the correct send queue (chunk data packets go to a separate queue).

    - #### wakeThreads

          void wakeThreads()

      Wakes reader and writer threads

    - #### processReadPackets

          void processReadPackets()

      Checks timeouts and processes all pending read packets.

    - #### getSocketAddress

          SocketAddress getSocketAddress()

      Return the InetSocketAddress of the remote endpoint

    - #### serverShutdown

          void serverShutdown()

      Shuts down the server. (Only actually used on the server)

    - #### packetSize

          int packetSize()

      returns 0 for memoryConnections

    - #### networkShutdown

          void networkShutdown(String s,
                             Object... var2)

      Shuts down the network with the specified reason. Closes all streams and sockets, spawns NetworkMasterThread to stop reading and writing threads.

    - #### closeConnections

          void closeConnections()