Merge branch 'exportnewsocket' of https://github.com/boopcat/Nim into boopcat-exportnewsocket

Conflicts:
	lib/pure/asyncnet.nim
This commit is contained in:
Dominik Picheta 2015-06-05 15:06:02 +01:00
commit c5708ef1ee
2 changed files with 6 additions and 6 deletions

View file

@ -91,13 +91,13 @@ type
# TODO: Save AF, domain etc info and reuse it in procs which need it like connect.
proc newAsyncSocket*(fd: AsyncFD, isBuff: bool): AsyncSocket =
proc newAsyncSocket*(fd: AsyncFD, buffered = true): AsyncSocket =
## Creates a new ``AsyncSocket`` based on the supplied params.
assert fd != osInvalidSocket.AsyncFD
new(result)
result.fd = fd.SocketHandle
result.isBuffered = isBuff
if isBuff:
result.isBuffered = buffered
if buffered:
result.currPos = 0
proc newAsyncSocket*(domain: Domain = AF_INET, typ: SockType = SOCK_STREAM,