Added close() to async versions of scgi and httpserver.

This commit is contained in:
Dominik Picheta
2012-09-23 16:04:17 +01:00
parent bad34033de
commit 15dcb9a6a6
2 changed files with 10 additions and 2 deletions

View File

@@ -499,9 +499,13 @@ proc asyncHTTPServer*(handleRequest: proc (server: PAsyncHTTPServer, client: TSo
result = capturedRet
proc register*(d: PDispatcher, s: PAsyncHTTPServer) =
## Registers a PAsyncHTTPServer with a PDispatcher.
## Registers a ``PAsyncHTTPServer`` with a ``PDispatcher``.
d.register(s.asyncSocket)
proc close*(h: PAsyncHTTPServer) =
## Closes the ``PAsyncHTTPServer``.
h.asyncSocket.close()
when isMainModule:
var counter = 0