summary refs log tree commit diff stats
path: root/lib/pure/asyncdispatch.nim
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2014-09-07 00:58:49 +0200
committerAraq <rumpf_a@web.de>2014-09-07 00:58:49 +0200
commit0e5078429f6ede02f941e078f67f6365c78e51c6 (patch)
tree1d0961ff18693cfc4fdea14f178f78dd6a833c75 /lib/pure/asyncdispatch.nim
parent1cdb8022d00c4a17f5f411ed6d74bcc28f863b30 (diff)
parentcb8a25b3d1ed5ca873b4b19f157b84e7289ccf9b (diff)
downloadNim-0e5078429f6ede02f941e078f67f6365c78e51c6.tar.gz
Merge branch 'bigbreak' of https://github.com/Araq/Nimrod into bigbreak
Diffstat (limited to 'lib/pure/asyncdispatch.nim')
-rw-r--r--lib/pure/asyncdispatch.nim4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/pure/asyncdispatch.nim b/lib/pure/asyncdispatch.nim
index 052de6f3a..e521b8e64 100644
--- a/lib/pure/asyncdispatch.nim
+++ b/lib/pure/asyncdispatch.nim
@@ -449,6 +449,8 @@ when defined(windows) or defined(nimdoc):
     ## complete once all the data requested is read, a part of the data has been
     ## read, or the socket has disconnected in which case the future will
     ## complete with a value of ``""``.
+    ##
+    ## **Warning**: The ``Peek`` socket flag is not supported on Windows.
 
 
     # Things to note:
@@ -458,6 +460,8 @@ when defined(windows) or defined(nimdoc):
     #     '\0' in the message currently signifies a socket disconnect. Who
     #     knows what will happen when someone sends that to our socket.
     verifyPresence(socket)
+    assert SocketFlag.Peek notin flags, "Peek not supported on Windows."
+
     var retFuture = newFuture[string]("recv")
     var dataBuf: TWSABuf
     dataBuf.buf = cast[cstring](alloc0(size))