summary refs log tree commit diff stats
path: root/lib/pure/asyncnet.nim
diff options
context:
space:
mode:
authorDominik Picheta <dominikpicheta@googlemail.com>2015-06-05 15:06:02 +0100
committerDominik Picheta <dominikpicheta@googlemail.com>2015-06-05 15:06:02 +0100
commitc5708ef1eebb29cabcdb84371805b88891d5042b (patch)
treeee872a0f38769fd1b83446eb3476d1e93b2e0789 /lib/pure/asyncnet.nim
parent62376c065733340f5f62b58556e26e9b3ec5a2f0 (diff)
parentaf07db28297e0d4d03a1c1e64da524b0119d62fe (diff)
downloadNim-c5708ef1eebb29cabcdb84371805b88891d5042b.tar.gz
Merge branch 'exportnewsocket' of https://github.com/boopcat/Nim into boopcat-exportnewsocket
Conflicts:
	lib/pure/asyncnet.nim
Diffstat (limited to 'lib/pure/asyncnet.nim')
-rw-r--r--lib/pure/asyncnet.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/asyncnet.nim b/lib/pure/asyncnet.nim
index d44e5d31f..01c28a13a 100644
--- a/lib/pure/asyncnet.nim
+++ b/lib/pure/asyncnet.nim
@@ -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,