18 December 2018

Most interesting Socket Options

  • 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 :

My Blog List

Blog Archive

Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.