Disable nagle algorithm / enable TCP_NODELAY for GP connections
Hello, I'm using openconnect for a GP connection, using SSL over TCP.
I found that interactive connections like SSH have some lag spikes (~ 200ms) which is extremely annoying. This is due to the nagle algorithm being enabled by default on tcp sockets. Could you please set the TCP_NODELAY option for ssl sockets? I patched my own installation of openconnect and my user experience improved greatly.
setsockopt(ssl_sock, IPPROTO_TCP, TCP_NODELAY, &(int){1}, sizeof (int));
Maybe with some error handling. Also, some include was missing for TCP_NODELAY
, don't know where to put it.
Thanks!