Half-open TCP connection can, of course, only be detected by writing the socket, or waiting for TCP timeout.