http://www.perlmonks.org?node_id=73705

staticsea has asked for the wisdom of the Perl Monks concerning the following question:

I have a client/server application that I am working on, that both the client and the server have the capability of having a rather complicated conversation like an ftp client/server would.

The problem I have run into is that I have used a while loop on the client to listen for messages from the server, if the server daemon process dies, the client goes into an endless loop.

Is there a standard way of knowing that a socket connection has been lost on the client side?

I am using Perl 5.005_03 (on FreeBSD 4.3-RC#2), and IO-1.2, so I am not working with the latest and greatest, but I am forced to work within this framework for various reasons.

Originally posted as a Categorized Question.