diff options
Diffstat (limited to 'Hotline/Shared/NetSocket.swift')
| -rw-r--r-- | Hotline/Shared/NetSocket.swift | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Hotline/Shared/NetSocket.swift b/Hotline/Shared/NetSocket.swift index 5b33f61..a7d44ce 100644 --- a/Hotline/Shared/NetSocket.swift +++ b/Hotline/Shared/NetSocket.swift @@ -254,16 +254,16 @@ final class NetSocket: NSObject, StreamDelegate { if setsockopt(socketHandle, SOL_SOCKET, SO_KEEPALIVE, &value, size) != 0 { print("NetSocket: failed to set SO_KEEPALIVE"); } - // Number of keepalives before close (including first keepalive packet) - value = 5 - if setsockopt(socketHandle, IPPROTO_TCP, TCP_KEEPCNT, &value, size) != 0 { - print("NetSocket: failed to set TCP_KEEPCNT"); - } - // Idle time used when SO_KEEPALIVE is enabled. Sets how long connection must be idle before keepalive is sent. - value = 60 - if setsockopt(socketHandle, IPPROTO_TCP, TCP_KEEPALIVE, &value, size) != 0 { - print("NetSocket: failed to set TCP_KEEPALIVE") - } +// // Number of keepalives before close (including first keepalive packet) +// value = 5 +// if setsockopt(socketHandle, IPPROTO_TCP, TCP_KEEPCNT, &value, size) != 0 { +// print("NetSocket: failed to set TCP_KEEPCNT"); +// } +// // Idle time used when SO_KEEPALIVE is enabled. Sets how long connection must be idle before keepalive is sent. +// value = 60 +// if setsockopt(socketHandle, IPPROTO_TCP, TCP_KEEPALIVE, &value, size) != 0 { +// print("NetSocket: failed to set TCP_KEEPALIVE") +// } } } } |