On Thu, Jan 15, 2004 at 03:35:35PM +1300, Sam Vilain wrote:
> On Thu, 15 Jan 2004 05:56, Rocco Caputo wrote;
> 
>   > Otherwise I'm not sure how to get into Net::SSLeay to make its
>   > accept() not block.  It's just a thin wrapper to a C
>   > library.  Does anyone have experience here?  Does a different SSL
>   > module support it?
> 
> When I was looking at the openssl library, I recall you just pass it
> in a socket with O_NONBLOCK set to signal nonblocking action.
> 
> And get ready to catch the errors ;-).
> 
> Otherwise, the openssl library should be trivial to wrap directly with
> some XS.  Its interface mirrors standard sockets exactly...

Can you investigate this some more?  I originally tried to use
Net::SSLeay's accept() and connect() in non-blocking mode, but that
broke the SSL session negotiation.

While accept() and connect() follow the BSD sockets interface,
Net::SSLeay expects them to send and receive data before they return.
In O_NONBLOCK mode, accept() and connect() return before the SSL session
is fully established, and I don't know how to resume that.

All of the blocking issues would be taken care of it we can drive that
process with select().

Net::SSLeay already wraps openssl.  Is there a better option?

-- 
Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/

Reply via email to