Added close() to async versions of scgi and httpserver.
This commit is contained in:
parent
bad34033de
commit
15dcb9a6a6
2 changed files with 10 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue