public class TcpConnection extends Object implements INetworkManager
| Modifier and Type | Field and Description |
|---|---|
static int[] |
field_74467_d |
int |
field_74468_e |
static AtomicInteger |
field_74469_b |
static int[] |
field_74470_c |
static AtomicInteger |
field_74471_a |
| Constructor and Description |
|---|
TcpConnection(Socket par1Socket,
String par2Str,
NetHandler par3NetHandler) |
TcpConnection(Socket par1Socket,
String par2Str,
NetHandler par3NetHandler,
PrivateKey par4PrivateKey) |
| Modifier and Type | Method and Description |
|---|---|
void |
addToSendQueue(Packet par1Packet)
Adds the packet to the correct send queue (chunk data packets go to a separate queue).
|
void |
closeConnections() |
Socket |
getSocket() |
SocketAddress |
getSocketAddress()
Return the InetSocketAddress of the remote endpoint
|
void |
networkShutdown(String par1Str,
Object... par2ArrayOfObj)
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 par1NetHandler)
Sets the NetHandler for this NetworkManager.
|
void |
wakeThreads()
Wakes reader and writer threads
|
public static AtomicInteger field_74471_a
public static AtomicInteger field_74469_b
public static int[] field_74470_c
public static int[] field_74467_d
public int field_74468_e
public TcpConnection(Socket par1Socket, String par2Str, NetHandler par3NetHandler) throws IOException
IOExceptionpublic TcpConnection(Socket par1Socket, String par2Str, NetHandler par3NetHandler, PrivateKey par4PrivateKey) throws IOException
IOExceptionpublic void closeConnections()
closeConnections in interface INetworkManagerpublic void setNetHandler(NetHandler par1NetHandler)
setNetHandler in interface INetworkManagerpublic void addToSendQueue(Packet par1Packet)
addToSendQueue in interface INetworkManagerpublic void wakeThreads()
wakeThreads in interface INetworkManagerpublic void networkShutdown(String par1Str, Object... par2ArrayOfObj)
networkShutdown in interface INetworkManagerpublic void processReadPackets()
processReadPackets in interface INetworkManagerpublic SocketAddress getSocketAddress()
getSocketAddress in interface INetworkManagerpublic void serverShutdown()
serverShutdown in interface INetworkManagerpublic int packetSize()
packetSize in interface INetworkManager