Copied most blocking socket operations to the net module.

This commit is contained in:
Dominik Picheta 2014-03-22 15:42:40 +00:00
commit 2ce9f1c77f
4 changed files with 1020 additions and 33 deletions

View file

@ -9,7 +9,7 @@
import os, oids, tables, strutils, macros
import sockets2, net
import sockets2
## Asyncio2
## --------
@ -772,7 +772,7 @@ proc processBody(node, retFutureSym: PNimrodNode): PNimrodNode {.compileTime.} =
else: discard
of nnkDiscardStmt:
# discard await x
if node[0][0].ident == !"await":
if node[0][0].kind == nnkIdent and node[0][0].ident == !"await":
var dummy = newNimNode(nnkStmtList)
createVar("futureDiscard_" & $toStrLit(node[0][1]), node[0][1], dummy)
else: discard