in reply to Re: How to find out whether socket is still connected?
in thread How to find out whether socket is still connected?

I confirm getpeername will do the trick. if the remote end has closed connection then getpeername will fail. RS.
  • Comment on Re^2: How to find out whether socket is still connected?

Replies are listed 'Best First'.
Re^3: How to find out whether socket is still connected?
by FunkyWinkerbean (Novice) on Feb 28, 2012 at 17:26 UTC

    I understand this is an outdated post, but I need confirmation that getpeername is a reliable test that socket is still connected. Is there a best practice please?