protected void start() throws IOException { socket.setSendBufferSize(getLocalMaxPacketSize()); socket.setReceiveBufferSize(getRemoteMaxPacketSize()); final Event<IOException> soc2chan = new StreamCopier(socket.getInputStream(), getOutputStream(), loggerFactory) .bufSize(getRemoteMaxPacketSize()) .spawnDaemon("soc2chan"); final Event<IOException> chan2soc = new StreamCopier(getInputStream(), socket.getOutputStream(), loggerFactory) .bufSize(getLocalMaxPacketSize()) .spawnDaemon("chan2soc"); SocketStreamCopyMonitor.monitor(5, TimeUnit.SECONDS, soc2chan, chan2soc, this, socket); }
protected void start() throws IOException { socket.setSendBufferSize(getLocalMaxPacketSize()); socket.setReceiveBufferSize(getRemoteMaxPacketSize()); final Event<IOException> soc2chan = new StreamCopier(socket.getInputStream(), getOutputStream()) .bufSize(getRemoteMaxPacketSize()) .spawnDaemon("soc2chan"); final Event<IOException> chan2soc = new StreamCopier(getInputStream(), socket.getOutputStream()) .bufSize(getLocalMaxPacketSize()) .spawnDaemon("chan2soc"); SocketStreamCopyMonitor.monitor(5, TimeUnit.SECONDS, soc2chan, chan2soc, this, socket); }
protected void start() throws IOException { socket.setSendBufferSize(getLocalMaxPacketSize()); socket.setReceiveBufferSize(getRemoteMaxPacketSize()); final Event<IOException> soc2chan = new StreamCopier(socket.getInputStream(), getOutputStream(), loggerFactory) .bufSize(getRemoteMaxPacketSize()) .spawnDaemon("soc2chan"); final Event<IOException> chan2soc = new StreamCopier(getInputStream(), socket.getOutputStream(), loggerFactory) .bufSize(getLocalMaxPacketSize()) .spawnDaemon("chan2soc"); SocketStreamCopyMonitor.monitor(5, TimeUnit.SECONDS, soc2chan, chan2soc, this, socket); }