proxy progress

This commit is contained in:
rusefi 2020-07-08 21:59:07 -04:00
parent 70752cc8cd
commit 35cc5d4247
3 changed files with 4 additions and 4 deletions

View File

@ -189,8 +189,6 @@ public class LinkManager {
String hostname = TcpConnector.getHostname(port);
socket = new Socket(hostname, portPart);
TcpIoStream tcpIoStream = new TcpIoStream(logger, socket);
IncomingDataBuffer dataBuffer = IncomingDataBuffer.createDataBuffer(tcpIoStream, logger);
tcpIoStream.setDataBuffer(dataBuffer);
return tcpIoStream;
} catch (Throwable e) {

View File

@ -90,8 +90,8 @@ public class BinaryProtocolServer implements BinaryProtocolCommands {
@SuppressWarnings("InfiniteLoopStatement")
private void runProxy(LinkManager linkManager, Socket clientSocket) throws IOException, InterruptedException {
TcpIoStream stream = new TcpIoStream(logger, clientSocket);
IncomingDataBuffer in = IncomingDataBuffer.createDataBuffer(stream, logger);
stream.setDataBuffer(in);
IncomingDataBuffer in = stream.getDataBuffer();
while (true) {
byte first = in.readByte();

View File

@ -33,6 +33,8 @@ public class TcpIoStream implements IoStream {
throw new NullPointerException("output");
this.output = output;
this.input = input;
IncomingDataBuffer dataBuffer = IncomingDataBuffer.createDataBuffer(this, logger);
setDataBuffer(dataBuffer);
}
@Override