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:
parent
b839e42e92
commit
5310a3044f
8 changed files with 492 additions and 137 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue