Implement SO_REUSEADDR for asyncnet and asynchttpserver.
This commit is contained in:
parent
96d1543c0d
commit
13e3c0d5bb
3 changed files with 20 additions and 2 deletions
|
|
@ -428,7 +428,8 @@ proc close*(socket: Socket) =
|
|||
elif res != 1:
|
||||
socketError(socket)
|
||||
|
||||
proc toCInt(opt: SOBool): cint =
|
||||
proc toCInt*(opt: SOBool): cint =
|
||||
## Converts a ``SOBool`` into its Socket Option cint representation.
|
||||
case opt
|
||||
of OptAcceptConn: SO_ACCEPTCONN
|
||||
of OptBroadcast: SO_BROADCAST
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue