mirror of
https://github.com/nim-lang/Nim.git
synced 2026-01-09 14:32:53 +00:00
Reuse socket in httpserver
This commit is contained in:
@@ -363,7 +363,7 @@ proc run*(handleRequest: proc (client: Socket,
|
||||
port = Port(80)) =
|
||||
## encapsulates the server object and main loop
|
||||
var s: TServer
|
||||
open(s, port)
|
||||
open(s, port, reuseAddr = true)
|
||||
#echo("httpserver running on port ", s.port)
|
||||
while true:
|
||||
next(s)
|
||||
|
||||
Reference in New Issue
Block a user