wahern / cqueues

Continuation Queues: Embeddable asynchronous networking, threading, and notification framework for Lua on Unix.
http://25thandclement.com/~william/projects/cqueues.html
MIT License
244 stars 37 forks source link

Do you know an option to make sockets with callbacks? #222

Closed otgo closed 5 years ago

daurnimator commented 5 years ago

You would just make a new thread and do your callback from there:

cq:wrap(function()
    return mycallback(mysocket:read())
end)
otgo commented 5 years ago

I mean something like NodeJS: ex: c:send("text", callbackhere)

daurnimator commented 5 years ago

That is up to you to build on top of cqueues if you want it.