error connection reset by peer 104

Common causes of the connection reset by peer

1. The number of concurrent connections to the server exceeds its carrying capacity, some of the server will close the connection;
2. errno = 104 indicates that an error or send you call a method to write a remote end of a connection socket has been closed, in which case next, after calling the send method or write, will be sent to the local end of the socket socket end a RESET signal, thereafter to continue if the write or send operation, will give errno to 104, error description connection reset by peer.
TCP may bind specific analysis of "four wave" off. TCP is a full-duplex channel, can be regarded as two simplex channels, two TCP connections at both ends of each endpoint is responsible for one. When call ends close, although intended to shut down the entire two channels, but the end just received FIN packets according to the semantics of the TCP protocol, it expressed the opposite end just closed a simplex channel that they are responsible, you can still continue to receive data. in other words, because limit the TCP protocol, an endpoint can not be informed of socket end is called close or shutdown.

For a TCP connection, if the peer perform close operation, it will send a FIN section points to this end, this time the reader end socket returns 0, we know that the other side has closed the connection, usually at this time we will call close in the local actively turn off the terminal. But if the other socket has performed close operation, the local socket also continue to write data in this connection, will trigger sending RST packets to the peer socket, in accordance with the four principles of TCP waved, this time the local socket should have begin operation close to the flow, then instead of retransmission data.

 

 

The original address: https: //www.cnblogs.com/satty/p/8491839.html

Common causes of the connection reset by peer

1. The number of concurrent connections to the server exceeds its carrying capacity, some of the server will close the connection;
2. errno = 104 indicates that an error or send you call a method to write a remote end of a connection socket has been closed, in which case next, after calling the send method or write, will be sent to the local end of the socket socket end a RESET signal, thereafter to continue if the write or send operation, will give errno to 104, error description connection reset by peer.
TCP may bind specific analysis of "four wave" off. TCP is a full-duplex channel, can be regarded as two simplex channels, two TCP connections at both ends of each endpoint is responsible for one. When call ends close, although intended to shut down the entire two channels, but the end just received FIN packets according to the semantics of the TCP protocol, it expressed the opposite end just closed a simplex channel that they are responsible, you can still continue to receive data. in other words, because limit the TCP protocol, an endpoint can not be informed of socket end is called close or shutdown.

For a TCP connection, if the peer perform close operation, it will send a FIN section points to this end, this time the reader end socket returns 0, we know that the other side has closed the connection, usually at this time we will call close in the local actively turn off the terminal. But if the other socket has performed close operation, the local socket also continue to write data in this connection, will trigger sending RST packets to the peer socket, in accordance with the four principles of TCP waved, this time the local socket should have begin operation close to the flow, then instead of retransmission data.

 

 

The original address: https: //www.cnblogs.com/satty/p/8491839.html

Guess you like

Origin www.cnblogs.com/lawliet-y/p/11904279.html