Packets not sending - NOT a client issue

This commit is contained in:
catfoolyou
2025-02-26 13:48:52 -05:00
parent 19a0d8e408
commit fa6d2902d7
7 changed files with 50 additions and 43 deletions

View File

@@ -118,6 +118,7 @@ public class WebSocketProxy extends SimpleChannelInboundHandler<ByteBuf> {
public void sendPacket(ByteBuffer arg1) {
if(tcpChannel != null && tcpChannel.isOpen()) {
System.out.println("[WebsocketProxy] - sending packet");
tcpChannel.write(Unpooled.wrappedBuffer(arg1));
}
}

View File

@@ -20,6 +20,7 @@ public class ChannelWrapper {
public synchronized void write(final Object packet) {
if (!this.closed) {
this.ch.write(packet);
ch.unsafe().flushNow();
}
}