mirror of
https://github.com/nim-lang/Nim.git
synced 2026-06-23 03:29:41 +00:00
Many fixes for asynchronous sockets. Asyncio should now work well with buffered and unbuffered plain and ssl sockets. Added asyncio
test to the test suite.
This commit is contained in:
@@ -241,7 +241,10 @@ proc port*(s: var TServer): TPort =
|
||||
|
||||
proc next*(s: var TServer) =
|
||||
## proceed to the first/next request.
|
||||
let (client, ip) = acceptAddr(s.socket)
|
||||
var client: TSocket
|
||||
new(client)
|
||||
var ip: string
|
||||
acceptAddr(s.socket, client, ip)
|
||||
s.client = client
|
||||
s.ip = ip
|
||||
s.headers = newStringTable(modeCaseInsensitive)
|
||||
|
||||
Reference in New Issue
Block a user