I am writing a long running perl script that connects to a NNTP server and fetches some articles, decodes the binaries, then fetch some more articles. Everything works fine, but sometimes the NNTP server disconnects me because the decode process takes too long. I want to have a way to test whether the connection is still there or have I timed out.
There needs to be a method that will return true if we are still connnected, and false otherwise. Much like DBI's ping method to test if we are still connected to the database. How would I go about doing this? Of course, there is the easy solution; just re-connect everytime I need to fetch articles. I would like your thoughts.
Btw, I am using Net::NNTP, and I have poked around in the source to see if there's any undocumented methods I can call. But it's all very ugly and I have not found anything that helps.
In reply to Net::NNTP ping? by akis
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |