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