diff options
author | Aman Gupta <aman@tmm1.net> | 2015-10-06 11:06:41 -0700 |
---|---|---|
committer | Aman Gupta <aman@tmm1.net> | 2015-10-06 11:06:41 -0700 |
commit | eea8d604d07aae569843ebccc5bd7791cff40567 (patch) | |
tree | dbb652a24acbf0dfd28e2921f72b0d92fe4a858d /lib/pure/asyncnet.nim | |
parent | a01fd5e93f58a2bf9dea4f577218b8ff7d874bbf (diff) | |
parent | 2e413d3186455bf92ee9bae04304cb34cf1f2557 (diff) | |
download | Nim-eea8d604d07aae569843ebccc5bd7791cff40567.tar.gz |
Merge remote-tracking branch 'origin/devel' into fix-test-failures
Diffstat (limited to 'lib/pure/asyncnet.nim')
-rw-r--r-- | lib/pure/asyncnet.nim | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/pure/asyncnet.nim b/lib/pure/asyncnet.nim index d7a8c3094..6b19a48be 100644 --- a/lib/pure/asyncnet.nim +++ b/lib/pure/asyncnet.nim @@ -56,7 +56,7 @@ ## import asyncdispatch -import rawsockets +import nativesockets import net import os @@ -112,8 +112,8 @@ proc newAsyncSocket*(domain: Domain = AF_INET, sockType: SockType = SOCK_STREAM, ## ## This procedure will also create a brand new file descriptor for ## this socket. - result = newAsyncSocket(newAsyncRawSocket(domain, sockType, protocol), domain, - sockType, protocol, buffered) + result = newAsyncSocket(newAsyncNativeSocket(domain, sockType, protocol), + domain, sockType, protocol, buffered) proc newAsyncSocket*(domain, sockType, protocol: cint, buffered = true): AsyncSocket = @@ -121,8 +121,9 @@ proc newAsyncSocket*(domain, sockType, protocol: cint, ## ## This procedure will also create a brand new file descriptor for ## this socket. - result = newAsyncSocket(newAsyncRawSocket(domain, sockType, protocol), - Domain(domain), SockType(sockType), Protocol(protocol), buffered) + result = newAsyncSocket(newAsyncNativeSocket(domain, sockType, protocol), + Domain(domain), SockType(sockType), + Protocol(protocol), buffered) when defined(ssl): proc getSslError(handle: SslPtr, err: cint): cint = |