Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
lDEVinux
GitHub Repository: lDEVinux/eaglercraft
Path: blob/main/sp-server/src_aux/TcpReaderThread.java
8641 views
1
package net.minecraft.src;
2
3
class TcpReaderThread extends Thread {
4
final TcpConnection theTcpConnection;
5
6
TcpReaderThread(TcpConnection par1TcpConnection, String par2Str) {
7
super(par2Str);
8
this.theTcpConnection = par1TcpConnection;
9
}
10
11
public void run() {
12
TcpConnection.field_74471_a.getAndIncrement();
13
14
try {
15
while (TcpConnection.isRunning(this.theTcpConnection)
16
&& !TcpConnection.isServerTerminating(this.theTcpConnection)) {
17
while (true) {
18
if (!TcpConnection.readNetworkPacket(this.theTcpConnection)) {
19
try {
20
sleep(2L);
21
} catch (InterruptedException var5) {
22
;
23
}
24
}
25
}
26
}
27
} finally {
28
TcpConnection.field_74471_a.getAndDecrement();
29
}
30
}
31
}
32
33