c++ - telnet client connection stops receiveing data, server is still sending -


I am working in an embedded Linux environment.

It launches a Telnet daemon which runs on startup, a program is launched at a particular port and when a connection is received.

i.e.

  telnetd -l / usr / local / bin / PROGA -p 1234  

PROGA- Some data on irregular intervals Will produce. When this data is not output, every X times it sends a 'heartbeat' type of string, so that the customer will know that we are still active, i.e. "heartbeat \ r \ n" / P>

Time after the random amount, the client (use the linux version of Telnet: has been started by telnet xxx.xxx.xxx.xxx 1234) 'heartbeat \ r \ N '

will fail to get

the data client sees:

  the heart's heart Heart beating heart beating ... heart beat [Nothing, heartbeat should be received] [nothing]  

Heart beats sent:

  result = print ("% s", heartbeat);  

Checking the result, it is always the length of the heartbeat . Logging in Syslog shows that printf () is executing at the appropriate interval with success

I have added since then and both of which are the success of the return, but Do not let the situation help.

Any help would be appreciated.

** UDPATE: Wireless capture was found on the server side. Very clearly the heartbeat is constantly being sent, there is no hesitation, no delay, although found something interesting on the client. In the case of this test, the client (telnet on Ubuntu 9.04) is suddenly stopped receiving heartbeat (described above). Wireshark confirms this, a large pause in the packet. Well, once the customer stopped stopping heartbeat, the customer buffer (all the heartbeats) started to suppress any kind of condition (on the customer). Virus Hark also shows these large-scale data in a packet on the client.

Unfortunately I do not know what it means, it's a line mode on / off thing? The end of the line (\ r \ n) is coming very clearly

** Update 2: Netcat instead of Telnet, the problem is not reproducible.

The first thing I will do is remove the Warhorck and try to figure out whether the server actually Sending message in It will also be useful on third-party PCs as well as running wireharks on the server.


Edit Ok, this was an interesting search on your client.

It seems that there is some type of terminal thing on the way instead of Telnet, you want to use the net cat program without requiring any specific formatting, in the raw mode one The TCP session is designed to send arbitrary data, and has the ability to hook an arbitrary process for a socket. On a Windows machine you can use the cyst in the raw mode to complete the same thing.

It may still be able to check traffic between your client and server with a third party. Kernel Optimization can be written to the network and internal buffering data. This is the only way to ensure that what really is happening on the wire.


Comments

Popular posts from this blog

windows - Heroku throws SQLITE3 Read only exception -

lex - Building a lexical Analyzer in Java -

python - rename keys in a dictionary -