Click here to Skip to main content
15,890,609 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I found some strange problems in TCP/IP communication.
As I know, in TCP/IP communications all the packets sent are checked whether they are correctly arrived to receiver from sender. And in UDP communications checking process is omitted.
But I found that TCP/IP checking routine does not work.
I am developing communication program between client and NodeJS server using TCP/IP protocol by C++.
But sometimes, packets are not sent to server or to client.
These problems occur when network is busy or many clients try to communicate with server.

Who can tell me why?
Posted
Comments
Richard MacCutchan 8-Dec-15 11:30am    
No one can tell you why, because we have no idea what your client or server are doing.
icmtop 8-Dec-15 15:52pm    
My client or server are sending or receiving json text.
{
"key": "list_response",
"ret": "1",
"list": "username:olesdennis, nickname:Olesdennis, status:false, contact:1, new_state:undefined, mood_msg:undefined",
"new_stat": "3",
"mood_msg": "Think different.",
"message": "OK"
}

1 solution

I don't think that is the problem; (it is hard to assume that the TCP stack implementation is so flawed).

If your logic is like this:
send a
send b
send c

and the receiver receives a and c, then it might be.

However, I assume that the receiver doesn't receive c, which means that the sender still has c (it is considered not sent), and you sender might need a reconnect to send again.

Your app must verify what happens with the result of a send command, and depends on you what to do next with the data not sent.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900