Note that there are some explanatory texts on larger screens.

plurals
  1. POtelnet client connection stops receiveing data, server is still sending
    text
    copied!<p>I'm Working in an embedded linux environment.</p> <p>it launches a telnet daemon on startup which watches on a particular port and launches a program when a connection is received.</p> <p>i.e. </p> <pre><code>telnetd -l /usr/local/bin/PROGA -p 1234 </code></pre> <p>PROGA - will output some data at irregular intervals. When it is not outputting data, every X period of time it sends out a 'heartbeat' type string to let the client know that we are still active i.e. "heartbeat\r\n"</p> <p>After a random amount of time, the client (use a linux version of telnet, launched by: <code>telnet xxx.xxx.xxx.xxx 1234)</code> will fail to receive the 'heartbeat\r\n'</p> <p>The data the client sees:</p> <pre><code>heartbeat heartbeat heartbeat ... heartbeat [nothing, should have received heartbeat] [nothing forever] </code></pre> <p>heartbeat is sent:</p> <pre><code>result = printf("%s", heartbeat); </code></pre> <p>checking result, it is always the length of <code>heartbeat</code>. Logging to syslog shows us that the <code>printf()</code> is executing with success at the proper intervals</p> <p>I've since added in a <a href="http://linux.die.net/man/3/tcdrain" rel="nofollow noreferrer">tcdrain</a> and <a href="http://linux.die.net/man/3/fflush" rel="nofollow noreferrer">fflush</a> which both return success, but do not seem to help the situation.</p> <p>Any help would be appreciated.</p> <p>**UDPATE: got a wireshark capture from the server side. Very Clearly the heartbeat is being sent continuously. No Hicups, no delays. Found something interesting on the client though. The client in this test case (telnet on Ubuntu 9.04) seems to suddenly stop receiving heartbeat (as describes above). Wireshark confirms this, big pause in packets. Well, once the client had stopped receiving the heartbeat, pressing any keystroke (on the client) seems to trigger a spew of data from the client's buffer (all heartbeats). Wireshark on the client also shows this massive amount of data all in one packet.</p> <p>Unfortunately I don't really know what this means. It this a line mode on/off thing? Line endings (\r\n) are very clearly coming through. </p> <p>**Update 2: running netcat instead of telnetd, the problem is not reproducible.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload