Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: poorly documented behaviour of readline() and IO::Select

by choroba (Cardinal)
on Apr 28, 2010 at 10:57 UTC ( [id://837270]=note: print w/replies, xml ) Need Help??


in reply to poorly documented behaviour of readline() and IO::Select

I had a similar problem years ago. A server was communicating with several clients, but sometimes one line of the communication got lost somewhere. The sleep solution solved the problem, but even then I was not 100% sure the error did not occur rarely, time to time.

Replies are listed 'Best First'.
Re^2: poorly documented behaviour of readline() and IO::Select
by vsespb (Chaplain) on Apr 28, 2010 at 11:04 UTC
    sleep here is just for example. correct solution would be read with sysread/syswrite and detect newline somehow. or develop protocol which not depends on delimiter for messages.
Re^2: poorly documented behaviour of readline() and IO::Select
by Anonymous Monk on Apr 28, 2010 at 20:59 UTC
    Also! if you use eof or eof() together with sysread sysread does not work! (line gets buffered to read it by readline()) !

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://837270]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (7)
As of 2024-04-25 11:52 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found