ConnectionReset

ConnectionReset The connection was reset by the remote peer.

 

http://stackoverflow.com/questions/1434451/what-does-connection-reset-by-peer-mean

It's fatal. The remote server has sent you a RST packet, which indicates an immediate dropping of the connection, rather than the usual handshake.

This bypasses绕开 the normal half-closed state transition过渡,转变

"Connection reset by peer" is the TCP/IP equivalent of slamming砰地关上;猛力抨击 the phone back on the hook. 
It's more polite than merely仅仅 not replying, leaving one hanging. 
But it's not the FIN-ACK expected of the truly polite TCP/IP converseur. 
 

This can happen if the other side crashes and then comes back up,

 

This means that a TCP RST was received and the connection is now closed.

This occurs when a packet is sent from your end of the connection but the other end does not recognize the connection;

it will send back a packet with the RST bit set in order to forcibly强制地 close the connection.

 

This can happen if the other side crashes and then comes back up, or if it calls close() on the socket while there is data from you in transit运输,

and is an indication to you that some of the data that you previously sent may not have been received.

 

It is up to you whether that is an error;

if the information you were sending was only for the benefit of the remote client then it may not matter that any final data may have been lost.

However you should close the socket and free up any other resources associated with the connection.

 

基础概念

RST packet

RST packet is sent either in the middle of the 3-way handshake when the server rejects the connection or is unavailable OR in the middle of data transfer when either the server or client becomes unavailble or rejects further communication without the formal 4-way TCP connection termination process.

 

 

转载于:https://www.cnblogs.com/chucklu/p/4274192.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值