Click here to Skip to main content
15,885,985 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
192.168.1.152 is the Server
192.168.1.153 is the Client
Use TCP/IP protocol

the socket configed like this,both the Server and Client

C#
socket = new Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp);
socket.SetSocketOption(SocketOptionLevel.Socket, SocketOptionName.ReuseAddress, true);



Client connect to Server,and Server send the heartbeat packaget to Client.but the connect has the problem,

it occur after two days or a week or a month,so I use the Sniffer to get detail,
The results are as follows

Server->Client [PSH][ACk]
Client->Server [ACK]
Server->Client [PSH][ACk]
Client->Server [ACK]
Server->Client [PSH][ACk]
Client->Server [ACK]
.
.
.
Server->Client [PSH][ACk]
Client->Server [ACK]
Client->Server [ACK][RST]

Client ->Server[Three handshake]



where Client->Server [ACK][RST] come from and avoid
Posted

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