in reply to IO::Socket does not send FIN ack?

2007fld:

I've not done any socket programming for quite a few years, so this is a guess: But IIRC, it's because you haven't accepted a connection. Until you accept a connection, you don't have a connection with the remote server, and you won't get FIN until you terminate your connection.

...roboticus

Replies are listed 'Best First'.
Re^2: IO::Socket does not send FIN ack?
by Anonymous Monk on Jul 30, 2010 at 01:49 UTC
    Thanks for the posts above. So if I change the second listen to accept, that should do work?
    If the accept works well, do I still need to explictly close the socket, or the socket will be closed automatically?
    How do I see monitor the sockets opened? I was using netstat -na |grep port#, but feel it is not very effective.
      The socket will be closed automatically when the all copies of it go out of scope or get overwritten.