Don't ask to ask, just ask | |
PerlMonks |
Net::Server blocks on non-blocking socket with SSLby cavac (Parson) |
on Mar 31, 2015 at 11:36 UTC ( [id://1121965]=perlquestion: print w/replies, xml ) | Need Help?? |
cavac has asked for the wisdom of the Perl Monks concerning the following question: I'm using Net::Server for a lot of stuff, including my own Websocket implementation. For this, i switch the socket to non-blocking like this:
Then i do bytewise reads like this:
Works quite nicely, and yes, i'm aware that this isn't the most efficient way to do it. But it is nice and debugable. The problem is: When SSL is active, sysread() blocks, but it shouldn't. For SSL i use something like this (and yes, it works for most use cases, since i'm only using non-blocking sockets in websockets):
What am i doing wrong?
"For me, programming in Perl is like my cooking. The result may not always taste nice, but it's quick, painless and it get's food on the table."
Back to
Seekers of Perl Wisdom
|
|