@@ -12,8 +12,8 @@ module Network.Socket.Options (
1212 SocketOption (SockOpt
1313 ,UnsupportedSocketOption
1414 ,AcceptConn ,Debug ,ReuseAddr ,SoDomain ,Type ,SoProtocol ,SoError
15- ,DontRoute ,Broadcast ,SendBuffer ,RecvBuffer ,KeepAlive ,OOBInline
16- ,TimeToLive ,MaxSegment ,NoDelay ,Cork ,Linger ,ReusePort
15+ ,DontRoute ,Broadcast ,SendBuffer ,RecvBuffer ,KeepAlive ,KeepInit
16+ ,OOBInline , TimeToLive ,MaxSegment ,NoDelay ,Cork ,Linger ,ReusePort
1717 ,RecvLowWater ,SendLowWater ,RecvTimeOut ,SendTimeOut
1818 ,UseLoopBack ,UserTimeout ,IPv6Only
1919 ,RecvIPv4TTL ,RecvIPv4TOS ,RecvIPv4PktInfo
@@ -77,6 +77,7 @@ socketOptionBijection =
7777 , (SendBuffer , " SendBuffer" )
7878 , (RecvBuffer , " RecvBuffer" )
7979 , (KeepAlive , " KeepAlive" )
80+ , (KeepInit , " KeepInit" )
8081 , (OOBInline , " OOBInline" )
8182 , (Linger , " Linger" )
8283 , (ReusePort , " ReusePort" )
@@ -220,6 +221,15 @@ pattern KeepAlive = SockOpt (#const SOL_SOCKET) (#const SO_KEEPALIVE)
220221#else
221222pattern KeepAlive = SockOpt (- 1 ) (- 1 )
222223#endif
224+ -- | TCP_KEEPINIT
225+ pattern KeepInit :: SocketOption
226+ #ifdef TCP_KEEPINIT
227+ pattern KeepInit = SockOpt (# const IPPROTO_TCP ) (# const TCP_KEEPINIT )
228+ #elif defined(TCP_CONNECTIONTIMEOUT)
229+ pattern KeepInit = SockOpt (# const IPPROTO_TCP ) (# const TCP_CONNECTIONTIMEOUT )
230+ #else
231+ pattern KeepInit = SockOpt (- 1 ) (- 1 )
232+ #endif
223233-- | SO_OOBINLINE
224234pattern OOBInline :: SocketOption
225235#ifdef SO_OOBINLINE
@@ -299,8 +309,6 @@ pattern NoDelay = SockOpt (-1) (-1)
299309pattern UserTimeout :: SocketOption
300310#ifdef TCP_USER_TIMEOUT
301311pattern UserTimeout = SockOpt (# const IPPROTO_TCP ) (# const TCP_USER_TIMEOUT )
302- #elif defined(TCP_CONNECTIONTIMEOUT)
303- pattern UserTimeout = SockOpt (# const IPPROTO_TCP ) (# const TCP_CONNECTIONTIMEOUT )
304312#else
305313pattern UserTimeout = SockOpt (- 1 ) (- 1 )
306314#endif
0 commit comments