On Sun, Sep 07, 2003 at 05:08:27PM -0500, Jay Strauss wrote: > When my client successfully connects and disconnects to my poe server I get: > > Client session 4 got read error 0 (Normal disconnection) > > On my screen > > when my server isn't running but I run my client code, and I put: > print "return code: ", $poe_kernel->run, "\n"; > > I get: > Client 2 got connect error 111 (Connection refused) > return code: 7 > > Couple of questions: > 1) why is the connect error 111, but the return code different, 7
POE::Kernel's run() method doesn't return anything in particular. In Perl, a function that doesn't explicitly return anything IMplicitly returns the result of the last expression in it. I don't know why it returns 7 in particular. I could trace it and tell you, but that's a lot of work to explain ephemeral trivia. > 2) Do clients (and servers) always print the occurrence of connects & > disconnects to STDERR? Or am I not setting some parameter to silence it? You haven't defined your own ClientError handler. POE::Component::Server::TCP includes a default ClientError handler that displays error messages to STDERR. In POE 0.26, it displays all client errors, including the non-errors like "Normal disconnection". In POE 0.27 (also the cvs version), the default handler does not show "Normal disconnection" and "Connection reset by peer". > 3) Seems like there are only return codes from ->run method, are others kept > in the heap that I should be checking? I don't understand this question. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/
