I read api of nio2, and find these ways to improve :
AsynchronousSocketChannel.setOption(StandardSocketOptions.SO_RCVBUF, [size]);
AsynchronousSocketChannel.setOption(StandardSocketOptions.SO_SNDBUF, [size]);
[size] = RTT (from ping) * bandwidth (from net-card)
these are depand on given situation:
AsynchronousSocketChannel.setOption(StandardSocketOptions.TCP_NODELAY, ...);
AsynchronousSocketChannel.setOption(StandardSocketOptions.SO_REUSEADDR, ...);
AsynchronousSocketChannel.setOption(StandardSocketOptions.SO_KEEPALIVE, ...);
Is there any other way for point to point?