more RSClient refactoring

This commit is contained in:
Lucwousin
2019-07-10 00:02:08 +02:00
parent 02ba0bbe57
commit 91fbcf3d6b
83 changed files with 670 additions and 592 deletions

View File

@@ -18,8 +18,8 @@ public class PacketWriter {
@ObfuscatedSignature(
signature = "Lfu;"
)
@Export("socket0")
AbstractSocket socket0;
@Export("socket")
AbstractSocket socket;
@ObfuscatedName("f")
@ObfuscatedSignature(
signature = "Lja;"
@@ -117,13 +117,13 @@ public class PacketWriter {
garbageValue = "-1839929685"
)
final void method240() throws IOException {
if (this.socket0 != null && this.field672 > 0) {
if (this.socket != null && this.field672 > 0) {
this.buffer.index = 0;
while (true) {
PacketBufferNode var1 = (PacketBufferNode)this.packetBufferNodes.last();
if (var1 == null || var1.field671 > this.buffer.array.length - this.buffer.index) {
this.socket0.write(this.buffer.array, 0, this.buffer.index);
this.socket.write(this.buffer.array, 0, this.buffer.index);
this.field675 = 0;
break;
}
@@ -157,7 +157,7 @@ public class PacketWriter {
)
@Export("setSocket")
void setSocket(AbstractSocket socket) {
this.socket0 = socket;
this.socket = socket;
}
@ObfuscatedName("o")
@@ -167,9 +167,9 @@ public class PacketWriter {
)
@Export("close")
void close() {
if (this.socket0 != null) {
this.socket0.close();
this.socket0 = null;
if (this.socket != null) {
this.socket.close();
this.socket = null;
}
}
@@ -181,7 +181,7 @@ public class PacketWriter {
)
@Export("removeSocket")
void removeSocket() {
this.socket0 = null;
this.socket = null;
}
@ObfuscatedName("g")
@@ -191,6 +191,6 @@ public class PacketWriter {
)
@Export("getSocket")
AbstractSocket getSocket() {
return this.socket0;
return this.socket;
}
}