TCP链接中常见名词是Client Server, 但是网络连接中经常出现Connection reset by peer
client:客户端
server: 服务端
peer: tcp端。
所以peer是脱离固定场景的, tcp的任意一端都叫peer.
客户端收到Connection reset by peer代表服务端关闭了链接
服务端收到Connection reset by peer代表客户端关闭了链接
关闭链接的原因可能性就比较多了:
- 防火墙,路由器等。
- 服务器链接满员,网络打满,CUP打满,网关打满等。
What does “connection reset by peer” mean?
https://stackoverflow.com/questions/1434451/what-does-connection-reset-by-peer-mean
参考这个文档,大概意思就是你收入到对方RST标识的socket包。
Troubleshoot TCP/IP connectivity | TCP/IP网络链接问题分析
https://docs.microsoft.com/en-us/windows/client-management/troubleshoot-tcpip-connectivity
peer to peer端到端 是P2P。 但P2P非C/S模型,是指客户端到客户端。 是两个本地客户端借server和内网穿透打洞技术进行通信。