- TCP_NODELAY
- SO_SNDBUF
- SO_RCVBUF
- Don't forget timeout !
socket = new Socket(host, port);
sock.setSoTimeout(5 * 1000); //milliseconds
socket.setTcpNoDelay(true);
socket.setSendBufferSize(1000);
socket.setReceiveBufferSize(1000);
https://eklitzke.org/the-caveats-of-tcp-nodelay
http://normanmaurer.me/presentations/2013-jax-networking-on-jvm/#/41
Don't want to Hassle
There are a few frameworks to rescue....
No comments :
Post a Comment