Fixes net/asyncdispatch on Windows. Ref #2976. Fixes #2996.

This commit is contained in:
Dominik Picheta 2015-06-25 22:36:53 +01:00
commit 6109e6a999
3 changed files with 59 additions and 47 deletions

View file

@ -483,7 +483,7 @@ when defined(windows) or defined(nimdoc):
RemoteSockaddr, RemoteSockaddrLength)
proc connect*(socket: AsyncFD, address: string, port: Port,
af = AF_INET): Future[void] =
af = rawsockets.AF_INET): Future[void] =
## Connects ``socket`` to server at ``address:port``.
##
## Returns a ``Future`` which will complete when the connection succeeds
@ -861,7 +861,7 @@ when defined(windows) or defined(nimdoc):
result.SocketHandle.setBlocking(false)
register(result)
proc newAsyncRawSocket*(domain: Domain = AF_INET,
proc newAsyncRawSocket*(domain: Domain = rawsockets.AF_INET,
typ: SockType = SOCK_STREAM,
protocol: Protocol = IPPROTO_TCP): AsyncFD =
## Creates a new socket and registers it with the dispatcher implicitly.