No, the server either needs to send you something periodically by design (a heatbeat), or you need to provoke it into sending something (by sending some request, even one for which you don't care about the answer).

As an example of the latter, my FTP client sends "TYPE I", "PWD" and other useless commands from time to time. None of the following accomplishes anything except to let the server know we are still alive, and conversely, letting us know the server is still alive.

COMMAND:> TYPE I 200 Type set to I COMMAND:> PWD 257 "/" is current directory. COMMAND:> TYPE A 200 Type set to A COMMAND:> PASV 227 Entering Passive Mode (69,163,167,32,177,6). COMMAND:> LIST STATUS:> Connecting ftp data socket 69.163.167.32:45318... 150 Opening ASCII mode data connection for file list 226 Transfer complete. COMMAND:> TYPE A 200 Type set to A COMMAND:> PWD 257 "/" is current directory. COMMAND:> REST 0 350 Restarting at 0. Send STORE or RETRIEVE to initiate transf +er COMMAND:> TYPE A 200 Type set to A COMMAND:> TYPE I 200 Type set to I

In reply to Re^3: Howto check if TCP connection is alive ? by ikegami
in thread Howto check if TCP connection is alive ? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.