Have you tried syswrite()? If I read the manual right, it returns undef if the socket is broken.
----- Original Message ----- From: "Ivan Heffner" <[EMAIL PROTECTED]> To: "David Nicol" <[EMAIL PROTECTED]> Cc: <modperl@perl.apache.org>; "Foo Ji- [EMAIL PROTECTED]" <[EMAIL PROTECTED]> Sent: Wednesday, December 21, 2005 3:46 AM Subject: Re: How do I check a socket to know it is not closed? > No error is thrown to trap. That's part of the problem. :-/ > > On 12/20/05, David Nicol <[EMAIL PROTECTED]> wrote: > > On 12/20/05, Ivan Heffner <[EMAIL PROTECTED]> wrote: > > > pache2::Connection object. It then reads a message from the > > > socket (this is working correctly) and then goes off and does some > > > work. When the work is finished, the handler needs to make sure that > > > the client is still listening on the other end of the socket before > > > sending the response. > > > > Why? What's wrong with trapping the error? > >