java.io.IOException: An established connection was aborted by the software in your host machine
at sun.nio.ch.SocketDispatcher.write0(Native Method)
at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:51)
at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93)
at sun.nio.ch.IOUtil.write(IOUtil.java:65)
at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471)
at xx.writeTo(ProxyBuffer.java:79)
at xx.writeToClient(ProxyConnector.java:59)
at xx.process(ProxyConnector.java:108)
at xx.processSelectorKeys(TcpProxy.java:135)
at xx.lambda$startSelectorThread$0(TcpProxy.java:110)
at java.lang.Thread.run(Thread.java:748)
当客户接受时,我们可以给参数什么? 当前参数
clientChannel.socket().setKeepAlive(true);
clientChannel.socket().setReceiveBufferSize(64 * 1024);
clientChannel.socket().setSendBufferSize(64 * 1024);