Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: Net::IRC Connection times out

by DigitalKitty (Parson)
on Oct 06, 2004 at 03:54 UTC ( #396865=note: print w/ replies, xml ) Need Help??


in reply to Net::IRC Connection times out

Hi Anonymous Monk.

IRC servers periodically send a 'PING' to clients that haven't been active for a period of time. In order to avoid a timeout, you need to send the response it is expecting (e.g. 'PONG').

Assuming you are reading from a socket and each line read is stored in a scalar named $input:

if ($input =~ /^PING(.*)$/i) { print $socket "PONG $1\r\n"; }


Hope this helps,
~Katie


Comment on Re: Net::IRC Connection times out
Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (9)
As of 2015-07-30 09:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (270 votes), past polls