Fixes asyncnet example.

This commit is contained in:
Dominik Picheta 2014-09-18 18:04:07 +01:00
commit 83e26cc4fa

View file

@ -31,7 +31,7 @@
## ##
## import asyncnet, asyncdispatch ## import asyncnet, asyncdispatch
## ##
## var clients: seq[AsyncSocket] = @[] ## var clients {.threadvar.}: seq[AsyncSocket]
## ##
## proc processClient(client: AsyncSocket) {.async.} = ## proc processClient(client: AsyncSocket) {.async.} =
## while true: ## while true:
@ -40,6 +40,7 @@
## await c.send(line & "\c\L") ## await c.send(line & "\c\L")
## ##
## proc serve() {.async.} = ## proc serve() {.async.} =
## clients = @[]
## var server = newAsyncSocket() ## var server = newAsyncSocket()
## server.bindAddr(Port(12345)) ## server.bindAddr(Port(12345))
## server.listen() ## server.listen()