I tried that and it didn't work.  I have this code:

    my $len = $sock->recv($buff, $want);

    warn "got the message\n";
    sleep 10;
    warn "sending the response\n";

    my $wlen = eval { $sock->send( "I heard $buff\n" ) };
    if ($@) {
        warn "They hung up!\n";
    }
    else {
        warn "sent $wlen bytes\n";
        $sock->send( "It's been good talking to you.  Good-bye\n" );
        $sock->close();
    }


I get the following in the log:

got the message
sending the response
sent 13 bytes
[Mon Dec 19 17:07:23 2005] [error] APR::Socket::send: (32) Broken pipe
at /home/iheffner/proto/lib/ProtoConnection.pm line 55

I need to know that the client app just stopped listening.  There is
no explicit timeout on the socket.

Ivan

On 12/19/05, Philip M. Gollucci <[EMAIL PROTECTED]> wrote:
> On Mon, 19 Dec 2005, Ivan Heffner wrote:
> > Any ideas or pointers on how to do this.  Even a redirect to some
> > (helpful) docs (Not the "Possible values: XXXX" docs) would be
> > helpful.
>
> t/protocol/TestProtocol/echo_timeout.pm
>
>
> ------------------------------------------------------------------------
> "Love is not the one you can picture yourself marrying,
> but the one you can't picture the rest of your life without."
>
> "It takes a minute to have a crush on someone, an hour to like someone,
> and a day to love someone, but it takes a lifetime to forget someone..."
>
> Philip M. Gollucci ([EMAIL PROTECTED]) 301.254.5198
> Consultant / http://p6m7g8.net/Resume/resume.shtml
> Senior Software Engineer - TicketMaster - http://ticketmaster.com
>
>

Reply via email to