Adds socket creation for arbitrary domain, type and protocol.
This commit is contained in:
parent
47d755b418
commit
867dfbfbfa
4 changed files with 31 additions and 0 deletions
|
|
@ -101,6 +101,10 @@ proc newAsyncSocket*(domain: TDomain = AF_INET, typ: TType = SOCK_STREAM,
|
|||
## Creates a new asynchronous socket.
|
||||
result = newSocket(newAsyncRawSocket(domain, typ, protocol), buffered)
|
||||
|
||||
proc newAsyncSocket*(domain, typ, protocol: cint, buffered = true): PAsyncSocket =
|
||||
## Creates a new asynchronous socket.
|
||||
result = newSocket(newAsyncRawSocket(domain, typ, protocol), buffered)
|
||||
|
||||
when defined(ssl):
|
||||
proc getSslError(handle: SslPtr, err: cint): cint =
|
||||
assert err < 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue