Path: blob/main/sp-server/src_aux/TcpWriterThread.java
8641 views
package net.minecraft.src;12import java.io.IOException;34class TcpWriterThread extends Thread {5final TcpConnection theTcpConnection;67TcpWriterThread(TcpConnection par1TcpConnection, String par2Str) {8super(par2Str);9this.theTcpConnection = par1TcpConnection;10}1112public void run() {13TcpConnection.field_74469_b.getAndIncrement();1415try {16while (TcpConnection.isRunning(this.theTcpConnection)) {17boolean var1;1819for (var1 = false; TcpConnection.sendNetworkPacket(this.theTcpConnection); var1 = true) {20;21}2223try {24if (var1 && TcpConnection.getOutputStream(this.theTcpConnection) != null) {25TcpConnection.getOutputStream(this.theTcpConnection).flush();26}27} catch (IOException var8) {28if (!TcpConnection.isTerminating(this.theTcpConnection)) {29TcpConnection.sendError(this.theTcpConnection, var8);30}3132var8.printStackTrace();33}3435try {36sleep(2L);37} catch (InterruptedException var7) {38;39}40}41} finally {42TcpConnection.field_74469_b.getAndDecrement();43}44}45}464748