summaryrefslogtreecommitdiff
path: root/net/ccxstream/files/patch-ccxclientconn.c
blob: 0a7132c6ef0c4ff4e302a1948dc268e86ea363f5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
--- ccxclientconn.c.orig	2003-03-17 14:29:15 UTC
+++ ccxclientconn.c
@@ -51,6 +51,11 @@ static void cc_xstream_client_socket_set
   i = 1;
   setsockopt(sock, IPPROTO_TCP,TCP_NODELAY, &i, sizeof (i));
 #endif /* TCP_NODELAY */
+
+#ifdef SO_KEEPALIVE
+  i = 1;
+  setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, &i, sizeof (i));
+#endif /* SO_KEEPALIVE */
 }
 
 CcXstreamClientError cc_xstream_client_connect(const char *host,