lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On 23 October 2014 02:38, Thijs Schreijer <thijs@thijsschreijer.nl> wrote:

List,

 

According to this [1] message in the archives LuaSec can handle non-blocking connections. I’d like to use it with Copas, but I’m not that familiar with all the ins and outs of the ssl stuff.

 

Does anyone have (a pointer to) some examples implementing this (copas with luasec, or just luasec used non-blocking)?

 

Any help is greatly appreciated!

Thijs

 

[1] http://lua-users.org/lists/lua-l/2010-12/msg00105.html


Totally tangential, but I've taken to using cqueues (http://25thandclement.com/~william/projects/cqueues.html) for new projects.
It includes a event system, that can work in plain lua or in copas-like coroutines.
It also includes ssl support.


If you want an overly complex example of luasec used in a non-blocking fashion, prosody uses it :)
See https://hg.prosody.im/trunk/file/4224abbf0fdd/net/server_select.lua#l559 for gory details, but it not for the faint of hearted.


Daurn.