    001    package net.minecraft.src;
    002
    003    import cpw.mods.fml.common.Side;
    004    import cpw.mods.fml.common.asm.SideOnly;
    005    import java.net.SocketAddress;
    006
    007    public interface NetworkManager
    008    {
    009        /**
    010         * Sets the NetHandler for this NetworkManager. Server-only.
    011         */
    012        void setNetHandler(NetHandler var1);
    013
    014        /**
    015         * Adds the packet to the correct send queue (chunk data packets go to a separate queue).
    016         */
    017        void addToSendQueue(Packet var1);
    018
    019        /**
    020         * Wakes reader and writer threads
    021         */
    022        void wakeThreads();
    023
    024        /**
    025         * Checks timeouts and processes all pending read packets.
    026         */
    027        void processReadPackets();
    028
    029        /**
    030         * Return the InetSocketAddress of the remote endpoint
    031         */
    032        SocketAddress getSocketAddress();
    033
    034        /**
    035         * Shuts down the server. (Only actually used on the server)
    036         */
    037        void serverShutdown();
    038
    039        /**
    040         * returns 0 for memoryConnections
    041         */
    042        int packetSize();
    043
    044        /**
    045         * Shuts down the network with the specified reason. Closes all streams and sockets, spawns NetworkMasterThread to
    046         * stop reading and writing threads.
    047         */
    048        void networkShutdown(String var1, Object ... var2);
    049
    050        @SideOnly(Side.CLIENT)
    051        void closeConnections();
    052    }