mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 00:24:16 +00:00
preparations for making 'closure' the default calling convention for proc types
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user