project: Rev 202

This commit is contained in:
Owain van Brakel
2021-12-14 18:20:58 +01:00
parent e974585ce8
commit 7c7bf0901a
406 changed files with 39725 additions and 39842 deletions

View File

@@ -77,14 +77,14 @@ public final class NetSocket extends AbstractSocket implements Runnable {
descriptor = "(Ljava/net/Socket;Leb;I)V"
)
public NetSocket(Socket var1, TaskHandler var2, int var3) throws IOException {
this.isClosed = false; // L: 16
this.outLength = 0; // L: 20
this.outOffset = 0; // L: 21
this.exceptionWriting = false; // L: 22
this.isClosed = false;
this.outLength = 0;
this.outOffset = 0;
this.exceptionWriting = false;
this.taskHandler = var2;
this.socket = var1; // L: 29
this.bufferLength = var3; // L: 30
this.maxPacketLength = var3 - 100; // L: 31
this.socket = var1;
this.bufferLength = var3;
this.maxPacketLength = var3 - 100;
this.socket.setSoTimeout(30000);
this.socket.setTcpNoDelay(true);
this.socket.setReceiveBufferSize(65536);
@@ -100,28 +100,28 @@ public final class NetSocket extends AbstractSocket implements Runnable {
)
@Export("close")
public void close() {
if (!this.isClosed) { // L: 41
synchronized(this) { // L: 42
this.isClosed = true; // L: 43
this.notifyAll(); // L: 44
} // L: 45
if (!this.isClosed) {
synchronized(this) {
this.isClosed = true;
this.notifyAll();
}
if (this.task != null) { // L: 46
while (this.task.status == 0) { // L: 47
Bounds.method6608(1L); // L: 48
if (this.task != null) {
while (this.task.status == 0) {
Bounds.method6608(1L);
}
if (this.task.status == 1) { // L: 50
if (this.task.status == 1) {
try {
((Thread)this.task.result).join(); // L: 52
} catch (InterruptedException var3) { // L: 54
((Thread)this.task.result).join();
} catch (InterruptedException var3) {
}
}
}
this.task = null; // L: 57
this.task = null;
}
} // L: 58
}
@ObfuscatedName("b")
@ObfuscatedSignature(
@@ -130,7 +130,7 @@ public final class NetSocket extends AbstractSocket implements Runnable {
)
@Export("readUnsignedByte")
public int readUnsignedByte() throws IOException {
return this.isClosed ? 0 : this.inputStream.read(); // L: 65 66
return this.isClosed ? 0 : this.inputStream.read();
}
@ObfuscatedName("p")
@@ -140,7 +140,7 @@ public final class NetSocket extends AbstractSocket implements Runnable {
)
@Export("available")
public int available() throws IOException {
return this.isClosed ? 0 : this.inputStream.available(); // L: 70 71
return this.isClosed ? 0 : this.inputStream.available();
}
@ObfuscatedName("m")
@@ -150,10 +150,10 @@ public final class NetSocket extends AbstractSocket implements Runnable {
)
@Export("isAvailable")
public boolean isAvailable(int var1) throws IOException {
if (this.isClosed) { // L: 75
if (this.isClosed) {
return false;
} else {
return this.inputStream.available() >= var1; // L: 76
return this.inputStream.available() >= var1;
}
}
@@ -164,21 +164,21 @@ public final class NetSocket extends AbstractSocket implements Runnable {
)
@Export("read")
public int read(byte[] var1, int var2, int var3) throws IOException {
if (this.isClosed) { // L: 80
if (this.isClosed) {
return 0;
} else {
int var4;
int var5;
for (var4 = var3; var3 > 0; var3 -= var5) { // L: 81 82 86
var5 = this.inputStream.read(var1, var2, var3); // L: 83
if (var5 <= 0) { // L: 84
for (var4 = var3; var3 > 0; var3 -= var5) {
var5 = this.inputStream.read(var1, var2, var3);
if (var5 <= 0) {
throw new EOFException();
}
var2 += var5; // L: 85
var2 += var5;
}
return var4; // L: 88
return var4;
}
}
@@ -189,33 +189,33 @@ public final class NetSocket extends AbstractSocket implements Runnable {
)
@Export("write0")
void write0(byte[] var1, int var2, int var3) throws IOException {
if (!this.isClosed) { // L: 92
if (this.exceptionWriting) { // L: 93
this.exceptionWriting = false; // L: 94
throw new IOException(); // L: 95
if (!this.isClosed) {
if (this.exceptionWriting) {
this.exceptionWriting = false;
throw new IOException();
} else {
if (this.outBuffer == null) { // L: 97
if (this.outBuffer == null) {
this.outBuffer = new byte[this.bufferLength];
}
synchronized(this) { // L: 98
for (int var5 = 0; var5 < var3; ++var5) { // L: 99
this.outBuffer[this.outOffset] = var1[var5 + var2]; // L: 100
this.outOffset = (this.outOffset + 1) % this.bufferLength; // L: 101
if ((this.maxPacketLength + this.outLength) % this.bufferLength == this.outOffset) { // L: 102
throw new IOException(); // L: 103
synchronized(this) {
for (int var5 = 0; var5 < var3; ++var5) {
this.outBuffer[this.outOffset] = var1[var5 + var2];
this.outOffset = (this.outOffset + 1) % this.bufferLength;
if ((this.maxPacketLength + this.outLength) % this.bufferLength == this.outOffset) {
throw new IOException();
}
}
if (this.task == null) { // L: 106
this.task = this.taskHandler.newThreadTask(this, 3); // L: 107
if (this.task == null) {
this.task = this.taskHandler.newThreadTask(this, 3);
}
this.notifyAll(); // L: 109
this.notifyAll();
}
}
}
} // L: 111
}
@ObfuscatedName("j")
@ObfuscatedSignature(
@@ -224,8 +224,8 @@ public final class NetSocket extends AbstractSocket implements Runnable {
)
@Export("write")
public void write(byte[] var1, int var2, int var3) throws IOException {
this.write0(var1, var2, var3); // L: 161
} // L: 162
this.write0(var1, var2, var3);
}
public void run() {
try {
@@ -233,75 +233,75 @@ public final class NetSocket extends AbstractSocket implements Runnable {
label84: {
int var1;
int var2;
synchronized(this) { // L: 118
if (this.outOffset == this.outLength) { // L: 119
if (this.isClosed) { // L: 120
synchronized(this) {
if (this.outOffset == this.outLength) {
if (this.isClosed) {
break label84;
}
try {
this.wait(); // L: 122
} catch (InterruptedException var10) { // L: 124
this.wait();
} catch (InterruptedException var10) {
}
}
var2 = this.outLength; // L: 126
if (this.outOffset >= this.outLength) { // L: 127
var2 = this.outLength;
if (this.outOffset >= this.outLength) {
var1 = this.outOffset - this.outLength;
} else {
var1 = this.bufferLength - this.outLength; // L: 128
var1 = this.bufferLength - this.outLength;
}
}
if (var1 <= 0) { // L: 130
if (var1 <= 0) {
continue;
}
try {
this.outputStream.write(this.outBuffer, var2, var1); // L: 132
} catch (IOException var9) { // L: 134
this.exceptionWriting = true; // L: 135
this.outputStream.write(this.outBuffer, var2, var1);
} catch (IOException var9) {
this.exceptionWriting = true;
}
this.outLength = (var1 + this.outLength) % this.bufferLength; // L: 137
this.outLength = (var1 + this.outLength) % this.bufferLength;
try {
if (this.outLength == this.outOffset) { // L: 139
if (this.outLength == this.outOffset) {
this.outputStream.flush();
}
} catch (IOException var8) { // L: 141
this.exceptionWriting = true; // L: 142
} catch (IOException var8) {
this.exceptionWriting = true;
}
continue;
}
try {
if (this.inputStream != null) { // L: 147
if (this.inputStream != null) {
this.inputStream.close();
}
if (this.outputStream != null) { // L: 148
if (this.outputStream != null) {
this.outputStream.close();
}
if (this.socket != null) { // L: 149
if (this.socket != null) {
this.socket.close();
}
} catch (IOException var7) { // L: 151
} catch (IOException var7) {
}
this.outBuffer = null; // L: 152
this.outBuffer = null;
break;
}
} catch (Exception var12) { // L: 154
AccessFile.RunException_sendStackTrace((String)null, var12); // L: 155
} catch (Exception var12) {
AccessFile.RunException_sendStackTrace((String)null, var12);
}
} // L: 157
}
protected void finalize() {
this.close(); // L: 61
} // L: 62
this.close();
}
@ObfuscatedName("b")
@ObfuscatedSignature(
@@ -309,7 +309,7 @@ public final class NetSocket extends AbstractSocket implements Runnable {
garbageValue = "320078998"
)
static final boolean method3119(char var0) {
return var0 == 160 || var0 == ' ' || var0 == '_' || var0 == '-'; // L: 28
return var0 == 160 || var0 == ' ' || var0 == '_' || var0 == '-';
}
@ObfuscatedName("b")
@@ -318,12 +318,12 @@ public final class NetSocket extends AbstractSocket implements Runnable {
garbageValue = "1774445817"
)
public static void method3118(AbstractArchive var0, int var1, int var2, int var3, boolean var4) {
class260.musicPlayerStatus = 1; // L: 32
class124.musicTrackArchive = var0; // L: 33
VarcInt.musicTrackGroupId = var1; // L: 34
class260.musicTrackFileId = var2; // L: 35
ChatChannel.musicTrackVolume = var3; // L: 36
DynamicObject.musicTrackBoolean = var4; // L: 37
class260.pcmSampleLength = 10000; // L: 38
} // L: 39
class260.musicPlayerStatus = 1;
class124.musicTrackArchive = var0;
VarcInt.musicTrackGroupId = var1;
class260.musicTrackFileId = var2;
ChatChannel.musicTrackVolume = var3;
DynamicObject.musicTrackBoolean = var4;
class260.pcmSampleLength = 10000;
}
}