Add SO_REUSEPORT support
This commit is contained in:
parent
31ebb11d73
commit
e174aa1dbc
4 changed files with 10 additions and 3 deletions
|
|
@ -72,7 +72,7 @@ type
|
|||
|
||||
SOBool* = enum ## Boolean socket options.
|
||||
OptAcceptConn, OptBroadcast, OptDebug, OptDontRoute, OptKeepAlive,
|
||||
OptOOBInline, OptReuseAddr
|
||||
OptOOBInline, OptReuseAddr, OptReusePort
|
||||
|
||||
ReadLineResult* = enum ## result for readLineAsync
|
||||
ReadFullLine, ReadPartialLine, ReadDisconnected, ReadNone
|
||||
|
|
@ -523,6 +523,7 @@ proc toCInt*(opt: SOBool): cint =
|
|||
of OptKeepAlive: SO_KEEPALIVE
|
||||
of OptOOBInline: SO_OOBINLINE
|
||||
of OptReuseAddr: SO_REUSEADDR
|
||||
of OptReusePort: SO_REUSEPORT
|
||||
|
||||
proc getSockOpt*(socket: Socket, opt: SOBool, level = SOL_SOCKET): bool {.
|
||||
tags: [ReadIOEffect].} =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue