proxy progress

This commit is contained in:
rusefi 2020-07-08 22:10:06 -04:00
parent 93dea17a4e
commit 825ed7b71a
4 changed files with 3 additions and 16 deletions

View File

@ -50,7 +50,5 @@ public interface IoStream extends WriteStream {
void close();
void setDataBuffer(IncomingDataBuffer dataBuffer);
IncomingDataBuffer getDataBuffer();
}

View File

@ -211,8 +211,6 @@ public class LinkManager {
// error already reported
return null;
}
IncomingDataBuffer dataBuffer = IncomingDataBuffer.createDataBuffer(stream, logger);
stream.setDataBuffer(dataBuffer);
return stream;
}
};

View File

@ -19,7 +19,7 @@ public class SerialIoStreamJSerialComm implements IoStream {
private SerialPort sp;
private final String port;
private final Logger logger;
private IncomingDataBuffer dataBuffer;
private final IncomingDataBuffer dataBuffer;
/**
* @see #openPort(String, Logger)
@ -28,6 +28,7 @@ public class SerialIoStreamJSerialComm implements IoStream {
this.sp = sp;
this.port = port;
this.logger = logger;
this.dataBuffer = IncomingDataBuffer.createDataBuffer(this, logger);
}
@Override
@ -61,11 +62,6 @@ public class SerialIoStreamJSerialComm implements IoStream {
return isClosed;
}
@Override
public void setDataBuffer(IncomingDataBuffer dataBuffer) {
this.dataBuffer = dataBuffer;
}
@Override
public IncomingDataBuffer getDataBuffer() {
return dataBuffer;

View File

@ -21,7 +21,7 @@ public class TcpIoStream implements IoStream {
private final OutputStream output;
private final Logger logger;
private boolean isClosed;
private IncomingDataBuffer dataBuffer;
private final IncomingDataBuffer dataBuffer;
public TcpIoStream(Logger logger, Socket socket) throws IOException {
InputStream input = new BufferedInputStream(socket.getInputStream());
@ -34,11 +34,6 @@ public class TcpIoStream implements IoStream {
this.output = output;
this.input = input;
IncomingDataBuffer dataBuffer = IncomingDataBuffer.createDataBuffer(this, logger);
setDataBuffer(dataBuffer);
}
@Override
public void setDataBuffer(IncomingDataBuffer dataBuffer) {
this.dataBuffer = dataBuffer;
}