Re: IO::Socket squirreliness

2005-08-25 Thread Mason Loring Bliss
On Wed, Aug 24, 2005 at 04:14:15PM -0400, Bob Showalter wrote: > A connect() followed by a close() is just another form of this scenario. You > need to have a client socket in order to detect the peer's closing the > connection. That clarifies things quite nicely. Thank you very much! -- Mason

RE: IO::Socket squirreliness

2005-08-24 Thread Bob Showalter
Bob Showalter wrote: > I don't think there's any problem with IO::Socket. Even if accept > returns a socket, you should receive an EOF on that socket when you > try to read from it, which tells you that the peer has closed the > connection. I think you just need to check for both situations: an > e

RE: IO::Socket squirreliness

2005-08-24 Thread Bob Showalter
Mason Loring Bliss wrote: > On Tue, Aug 23, 2005 at 11:10:58AM -0400, Mason Loring Bliss wrote: > >> Hi, all! I'm learning about dealing with sockets in Perl, and I've >> got a question about some unexpected behaviour exhibited by the >> following test script. >> >> In the case where I open a co

Re: IO::Socket squirreliness

2005-08-24 Thread Mason Loring Bliss
On Tue, Aug 23, 2005 at 11:10:58AM -0400, Mason Loring Bliss wrote: > Hi, all! I'm learning about dealing with sockets in Perl, and I've got a > question about some unexpected behaviour exhibited by the following test > script. > > In the case where I open a connection and then close it before >

IO::Socket squirreliness

2005-08-23 Thread Mason Loring Bliss
Hi, all! I'm learning about dealing with sockets in Perl, and I've got a question about some unexpected behaviour exhibited by the following test script. In the case where I open a connection and then close it before $socket->accept() is called, I'd except $socket->accept() to return undef, but it