@dom96
By the way, I think event-driven models are useful for plug-in programming. How
about adding events to asyncdispath and asynchttpserver? Such as :
proc handleError() {.async.} =
await sleepAsync(1000)
echo "handleError"
proc handleRequest(req) {.async.} =
await sleepAsync(1000)
while true:
var chunk = await req.readStream.recv()
if chunk == "":
break
echo "recv a chunk: " & chunk
server.on("clientError", handleError)
server.on("request", handleRequest)
