in reply to Re^2: how send message without new-line terminator on IO::Socket
in thread how send message without new-line terminator on IO::Socket
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.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: how send message without new-line terminator on IO::Socket
by earlati2 (Beadle) on Jul 26, 2006 at 14:58 UTC | |
by tye (Sage) on Jul 26, 2006 at 15:12 UTC | |
by earlati2 (Beadle) on Jul 27, 2006 at 07:33 UTC |