proxy progress
This commit is contained in:
parent
70752cc8cd
commit
35cc5d4247
|
@ -189,8 +189,6 @@ public class LinkManager {
|
||||||
String hostname = TcpConnector.getHostname(port);
|
String hostname = TcpConnector.getHostname(port);
|
||||||
socket = new Socket(hostname, portPart);
|
socket = new Socket(hostname, portPart);
|
||||||
TcpIoStream tcpIoStream = new TcpIoStream(logger, socket);
|
TcpIoStream tcpIoStream = new TcpIoStream(logger, socket);
|
||||||
IncomingDataBuffer dataBuffer = IncomingDataBuffer.createDataBuffer(tcpIoStream, logger);
|
|
||||||
tcpIoStream.setDataBuffer(dataBuffer);
|
|
||||||
|
|
||||||
return tcpIoStream;
|
return tcpIoStream;
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
|
|
@ -90,8 +90,8 @@ public class BinaryProtocolServer implements BinaryProtocolCommands {
|
||||||
@SuppressWarnings("InfiniteLoopStatement")
|
@SuppressWarnings("InfiniteLoopStatement")
|
||||||
private void runProxy(LinkManager linkManager, Socket clientSocket) throws IOException, InterruptedException {
|
private void runProxy(LinkManager linkManager, Socket clientSocket) throws IOException, InterruptedException {
|
||||||
TcpIoStream stream = new TcpIoStream(logger, clientSocket);
|
TcpIoStream stream = new TcpIoStream(logger, clientSocket);
|
||||||
IncomingDataBuffer in = IncomingDataBuffer.createDataBuffer(stream, logger);
|
|
||||||
stream.setDataBuffer(in);
|
IncomingDataBuffer in = stream.getDataBuffer();
|
||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
byte first = in.readByte();
|
byte first = in.readByte();
|
||||||
|
|
|
@ -33,6 +33,8 @@ public class TcpIoStream implements IoStream {
|
||||||
throw new NullPointerException("output");
|
throw new NullPointerException("output");
|
||||||
this.output = output;
|
this.output = output;
|
||||||
this.input = input;
|
this.input = input;
|
||||||
|
IncomingDataBuffer dataBuffer = IncomingDataBuffer.createDataBuffer(this, logger);
|
||||||
|
setDataBuffer(dataBuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Reference in New Issue