eaglercraft-1.5/sp-server/src_aux/TcpReaderThread.java

32 lines
716 B
Java
Raw Normal View History

2022-02-16 17:54:12 -08:00
package net.minecraft.src;
class TcpReaderThread extends Thread {
final TcpConnection theTcpConnection;
TcpReaderThread(TcpConnection par1TcpConnection, String par2Str) {
super(par2Str);
this.theTcpConnection = par1TcpConnection;
}
public void run() {
TcpConnection.field_74471_a.getAndIncrement();
try {
while (TcpConnection.isRunning(this.theTcpConnection)
&& !TcpConnection.isServerTerminating(this.theTcpConnection)) {
while (true) {
if (!TcpConnection.readNetworkPacket(this.theTcpConnection)) {
try {
sleep(2L);
} catch (InterruptedException var5) {
;
}
}
}
}
} finally {
TcpConnection.field_74471_a.getAndDecrement();
}
}
}