fixes for asynchttpserver

This commit is contained in:
Andreas Rumpf 2014-04-13 00:39:15 +02:00
commit fe387888bd
3 changed files with 15 additions and 8 deletions

View file

@ -92,6 +92,7 @@ proc recv*(socket: PAsyncSocket, size: int,
proc send*(socket: PAsyncSocket, data: string): PFuture[void] =
## Sends ``data`` to ``socket``. The returned future will complete once all
## data has been sent.
assert socket != nil
result = send(socket.fd.TAsyncFD, data)
proc acceptAddr*(socket: PAsyncSocket):