[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: using Copas with LuaSec, non-blocking ssl
- From: Oliver Kroth <oliver.kroth@...>
- Date: Wed, 04 Mar 2015 09:08:21 +0100
you are right. I found the same while implementing SSL with LuaSEC in my
Currently I am trying get LuaSec and Copas work together in a
non-blocking fashion, which is not that easy as there are some more
issues between the socket library and the Copas which make a
non-blocking connect() not 100% reliable on some OS.
The LuaSec functions in between complicate this a little bit further:-)
Am 03.03.2015 um 22:44 schrieb Thijs Schreijer:
Aaron B. wrote
On Thu, 23 Oct 2014 06:38:45 +0000
Thijs Schreijer <
Does anyone have (a pointer to) some examples implementing this (copas
with luasec, or just luasec used non-blocking)?
I remember it being surpisingly simple to get LuaSec and Copas to play
nice. In short, just call ssl.wrap() inside your handler function.
I needed it working for a project once, and it looks like my patch was
Aaron B. <
Took me a while, but got into this matter rather deep. From this line ,
it seems to me that it does not do non-blocking ssl. The timeout has a
default of 10 seconds, which means that it still might block for 10 seconds.
The LuaSec ssl wrapper will return "wantread" or "wantwrite" on a
non-blocking socket, which doesn't seem to be handled in the code. So from
what I see, the timeout is high enough to not encounter it... (but hence it
Or am I missing something?
View this message in context: http://lua.2524044.n2.nabble.com/using-Copas-with-LuaSec-non-blocking-ssl-tp7663632p7666106.html
Sent from the Lua-l mailing list archive at Nabble.com.