Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical

Re: Need Help with Sockets, Please

by ozone (Friar)
on May 09, 2002 at 14:24 UTC ( #165383=note: print w/replies, xml ) Need Help??

in reply to Need Help with Sockets, Please

Well, if you're lucky it may stay connected for a while, but you definitely need to check for $line being undefined, and then re-establish the connection. Otherwise your program will terminate when the socket closes.

You should take a look for POE on CPAN. It's built for exactly this kind of scenario. Bit of a learning curve though.

Also, you need to make sure you do a 'wait' (or define $SIG{SIG_CHLD}) somewhere, otherwhise you'll have problems if the child crashes for some reason!

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (6)
As of 2022-05-23 11:55 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (82 votes). Check out past polls.