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.

FIN vs RST in TCP connections different的更多相关文章

  1. Configure the max limit for concurrent TCP connections(转)

    To keep the TCP/IP stack from taking all resources on the computer, there are different parameters t ...

  2. 【转载】Configure the max limit for concurrent TCP connections

    转载地址:http://smallvoid.com/article/winnt-tcpip-max-limit.html To keep the TCP/IP stack from taking al ...

  3. tcp 关闭socket 不发 FIN(RST)

    转自:http://blog.chinaunix.net/uid-10106787-id-3172066.html 一般情况下,当TCP连接主动关闭时,会向对端发送一个FIN,对端会获得一个读事件,调 ...

  4. Using HttpClient properly to avoid CLOSE_WAIT TCP connections

    Apache的HttpComponent组件,用的人不在少数.但是能用好的人,却微乎其微,为什么?很简单,TCP里面的细节实现不是每个人都能捕获到的(细节是魔鬼),像并发请求控制&资源释放,N ...

  5. Managing TCP Connections in Dynamic Spectrum Access Based Wireless LANs

    2010年IEEE Secon的一篇文章.当然了,应该是之前就写好了,发表过,还是直接投到Secon了呢?直接投的吧,Secon不接受已发表过的吧. 本文的着笔点:有线网与DSAN(启用了DSA特性的 ...

  6. 如何利用wireshark对TCP消息进行分析

    原文:https://www.cnblogs.com/studyofadeerlet/p/7485298.html 如何利用wireshark对TCP消息进行分析   (1) 几个概念介绍 1 seq ...

  7. 网络安全之iptables防火墙

    1>各种传输方式到最后都会转化为能够通过网络发送的数据格式: 1>文本格式: 2>二进制格式:2>TCP三次握手连接,四次断开,连接时客户端是主动打开,服务器是被动 打开,处于 ...

  8. TCP协议: SYN ACK FIN RST PSH URG 详解

    TCP的三次握手是怎么进行的了:发送端发送一个SYN=1,ACK=0标志的数据包给接收端,请求进行连接,这是第一次握手:接收端收到请求并且允许连接的话,就会发送一个SYN=1,ACK=1标志的数据包给 ...

  9. 三十天学不会TCP,UDP/IP网络编程 - RST的用法

    不知不觉也写了这么多了,继续我的自己的推广大业~完整版可以去gitbook(https://www.gitbook.com/@rogerzhu/)看到. 如果对和程序员有关的计算机网络知识,和对计算机 ...

随机推荐

  1. ethr 微软开源的tcp udp http 网络性能测试工具

    ethr 是微软开源的tcp udp http 网络性能测试工具包包含的server 以及 client 我们可以远程测试 同时对于https icmp 的支持也在开发中,tcp 协议支持连接.带宽. ...

  2. KiCad 的 Digikey 元件库

    KiCad 的 Digikey 元件库 KiCad 最初由法国人Jean-Pierre Charras于1992年推出,目前由 CERN(欧洲核子研究组织)接手开发. 而且现在有很多大公司的加入,比如 ...

  3. 设计一个 硬件 实现的 Dictionary(字典)

    Dictionary 就是 字典, 是一种可以根据 Key 来 快速 查找 Value 的 数据结构 . 比如 我们在 C# 里用到的 Dictionary<T>, 在 程序设计 里, 字 ...

  4. Electron-vue 新建Demo

    vue init simulatedgreg/electron-vue Test(项目名)

  5. asterisk todo

    1, 如何让用户打一个密码才能继续外拨? 可以利用__9xxx那种做法 2,如何和onsip连起来? 3, 如何记录所有拨打记录?

  6. CF 666E Forensic Examination——广义后缀自动机+线段树合并

    题目:http://codeforces.com/contest/666/problem/E 对模式串建广义后缀自动机,询问的时候把询问子串对应到广义后缀自动机的节点上,就处理了“区间”询问. 还要处 ...

  7. python show slave status

    #!/usr/bin/env python import MySQLdbimport contextlib @contextlib.contextmanagerdef mysql(Host,Port, ...

  8. 调试PHP错误

    error_reporting(E_ALL & ~E_NOTICE); ini_set('display_errors', "On");

  9. ubuntu如何为获得root权限

    在终端中输入:sudo passwd rootEnter new UNIX password: (在这输入你的密码)Retype new UNIX password: (确定你输入的密码)passwd ...

  10. js图片预加载后触发操作

    为了使得图片加载完,再触发回调函数,需进行图片预加载处理 function loadImage(url, callback) { var img = new Image(); img.src = ur ...