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. 截断文件函数truncate和ftruncate

    两个函数目的都是将文件大小设置为length参数指定的值 int truncate(const char *pathname,off_t length)//pathname就是路径 int ftrun ...

  2. Unity 官方教程 学习

    Interface & Essentials Using the Unity Interface 1.Interface Overview https://unity3d.com/cn/lea ...

  3. 我发起并创立了一个 VMBC 的 子项目 D#

    大家好, 我发起并创立了一个 VMBC 的 子项目 D#  . 有关 VMBC ,  请参考 <我发起了一个 用 C 语言 作为 中间语言 的 编译器 项目 VMBC>     https ...

  4. 读DataSnap源代码(二)

    program Project1; {$APPTYPE GUI} {$R *.dres} uses Vcl.Forms, Web.WebReq, IdHTTPWebBrokerBridge, Form ...

  5. 【转】Linux安装HDF5及遇到的问题总结

    Linux安装HDF5及遇到的问题总结 转自: http://www.linuxdiyf.com/linux/26164.html   ubuntu版本:16.04.2 64位 从HDF官网(http ...

  6. DeviceIoControl函数对应的四种数据交换方式

    交换方式                                输入缓冲区                                         输出缓冲区 METHOD_BUFFE ...

  7. lsof根据端口返回进程号杀死进程的方法

    参考自:http://newmiracle.cn/?p=661 Linux shell根据端口返回进程号杀死进程的方法 kill -9 `lsof -t -i:8888` 这个就是杀死8888端口的进 ...

  8. Spring Cloud(Dalston.SR5)--Eureka 注册中心高可用-服务提供和消费

    由于 Eureka 注册中心只是在内存中保存服务注册实例,并且没有将服务注册实例进行同步,因此我们需要对服务提供和消费进行调整,需要指定服务提供和消费的注册.服务发现的具体Eureka 注册中心配置, ...

  9. 阅读<SMPTE 274M-2005 1920X1080>笔记

    阅读<SMPTE 274M-2005 1920X1080>笔记 1.1080i blank field 2.blank and active line timing Analog Digi ...

  10. ELK Stack 笔记

    ELK Stack ELK Stack ELK Stack ELK 介绍 架构 Elasticsearch 安装 常见问题 关闭 Elasticsearch Elasticsearch-head Ki ...