Adds socket creation for arbitrary domain, type and protocol.

This commit is contained in:
Dominik Picheta 2014-09-18 17:01:44 +01:00
commit 867dfbfbfa
4 changed files with 31 additions and 0 deletions

View file

@ -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