zoukankan      html  css  js  c++  java
  • FIN vs RST in TCP connections different

    question:

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

    • send FIN flag
    • send RST flag

    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?

    answer:

    • 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 says: "There is no conversation. I won't say anything and I won't listen to anything you say."

      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.

  • 相关阅读:
    Interesting Finds: 2009 01.15 ~ 01.17
    Interesting Finds: 2008.12.07
    Interesting Finds: 2008.12.31
    10月16号
    10月14号
    10月15号
    10月13号
    10月20号
    10月19号
    10月12号
  • 原文地址:https://www.cnblogs.com/ricks/p/9753102.html
Copyright © 2011-2022 走看看