You cannot use <$new_sock> anymore, because that waits for a newline character. You need to use read instead. You also likely want nonblocking IO using the four-argument version of select. Likely, IO::Select wraps this up nicely for you. There is example code on how to use IO::Select in its documentation. For select, I didn't find any nice documentation.
Basically, select and IO::Select return once a socket is ready to receive more data or to send more data, and tell you which socket(s).
There are three multiplexing frameworks I know of that handle nonblocking sockets in a manner that is more or less inconveniencing - POE, Danga::Socket and Coro. All three have different uses and different shortcomings.
In reply to Re^3: how send message without new-line terminator on IO::Socket
by Corion
in thread how send message without new-line terminator on IO::Socket
by earlati2
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |