Cygwin: tcp: Support TCP_KEEPIDLE, TCP_KEEPCNT, TCP_KEEPINTVL
Use WSAIoctl(SIO_KEEPALIVE_VALS) on older systems. Make sure that keep-alive timeout is equivalent to TCP_KEEPIDLE + TCP_KEEPCNT * TCP_KEEPINTVL on older systems, even with TCP_KEEPCNT being a fixed value on those systems. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
@ -720,6 +720,11 @@ class fhandler_socket_inet: public fhandler_socket_wsock
|
||||
private:
|
||||
bool oobinline; /* True if option SO_OOBINLINE is set */
|
||||
bool tcp_fastopen; /* True if TCP_FASTOPEN is set on older systems */
|
||||
int tcp_keepidle; /* TCP_KEEPIDLE value in secs on older systems */
|
||||
int tcp_keepcnt; /* TCP_KEEPCNT value on older systems */
|
||||
int tcp_keepintvl; /* TCP_KEEPINTVL value in secs on older systems */
|
||||
|
||||
int set_keepalive (int keepidle, int keepcnt, int keepintvl);
|
||||
protected:
|
||||
int af_local_connect () { return 0; }
|
||||
|
||||
|
Reference in New Issue
Block a user