proxySocket.onData(new StringOrBufferEventHandler() {
@Override
protected void onEvent() {
Buffer buffer = getBuffer();
proxyStream.append(buffer);
Message message;
do {
message = logMessage(proxyStream, true);
if (message != null) {
gwtCodeSocket.write(message.toBuffer());
}
} while (message != null);
//gwtCodeSocket.write(buffer);
}
});
gwtCodeSocket.onData(new StringOrBufferEventHandler() {
@Override
protected void onEvent() {
Buffer buffer = getBuffer();
gwtCodeStream.append(buffer);
Message message;
do {
message = logMessage(gwtCodeStream, false);
if (message != null) {
proxySocket.write(message.toBuffer());
}
} while (message != null);
//proxySocket.write(buffer);
}
});