preparations for making 'closure' the default calling convention for proc types
This commit is contained in:
parent
56b4e3ad91
commit
8d99753d63
36 changed files with 117 additions and 102 deletions
|
|
@ -347,7 +347,8 @@ proc close*(s: TServer) =
|
|||
## closes the server (and the socket the server uses).
|
||||
close(s.socket)
|
||||
|
||||
proc run*(handleRequest: proc (client: TSocket, path, query: string): bool,
|
||||
proc run*(handleRequest: proc (client: TSocket,
|
||||
path, query: string): bool {.closure.},
|
||||
port = TPort(80)) =
|
||||
## encapsulates the server object and main loop
|
||||
var s: TServer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue