TCP连接中的FIN与RST [英] FIN vs RST in TCP connections

查看:1285
本文介绍了TCP连接中的FIN与RST的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

据我了解,有两种关闭TCP连接的方法:

The way I understand this, there are 2 ways to close TCP connection:

  • 发送FIN标志
  • 发送RST标志

RST导致立即终止连接,而在FIN中,您得到确认.

RST causes immediate connection termination, while in FIN you get a confirmation.

我了解这项权利,两者之间还有其他区别吗?这两个标志可以一起使用吗?

Do I understand this right, and are there any other distinctions between the two? Can those 2 flags be used together?

推荐答案

  • FIN说道:我已经跟您说完了,但是我仍然会听您说的一切,直到您说完为止."

    • FIN says: "I finished talking to you, but I'll still listen to everything you have to say until you say that you're done."

      RST说:没有对话.我不会说任何话,也不会听您说的话."

      RST says: "There is no conversation. I won't say anything and I won't listen to anything you say."

      RST很有用.如果其中一台计算机重新启动,则它会忘记连接,而另一台计算机一旦发送另一个数据包,就会获得RST.

      RST is useful if you have long lasting TCP connection with little traffic. If one of the computers is restarted, it forgets about the connection, and the other computer gets RST, as soon as it sends another packet.

      这篇关于TCP连接中的FIN与RST的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆