tcp是点到点的,只有一条路径,到达顺序和发送顺序是相同的
回复的确认号是序发送端的序列号加上data的长度 1+9=10
发送端的序列号也是那么算的
ack和下一个seq一样 那就没问题


三次握手四次挥手:

为啥是三次呢?
假如一次,那你连接上没有你也不知道呀,得等人回复才能知道你连上没啊
两次的话假如你恶意发 对方确认就连接 那一会就连满了
四次挥手:


我发出请求要断开 对面确认 对面再发出断开请求 然后我再确认 就是四次挥手

tcp是流协议
将应用程序看成是一个无结构的字节流
每一个tcp他的一个接口有一个发送缓冲区???啥意思
字节流太长就拆分发送 太短就合并到一个缓冲区 够了再发
对方收到数据确认 然后发送端的缓冲区数据才会被清除



拥塞控制,概念:就是指在某段时间内,如果我们对网络中的某一个资源的需求超过了该资源所能提供的可用部分,这个时候网络性能发生变化了,就出现了一个拥塞,那我们拥塞控制它主要的目的就是防止过多的数据注入到网络中,这样可以使网络中的路由器或者链路不会出现这种拥塞的情况
那我们去避免这个拥塞一般是有几种的方法:
第一个就是这个慢开始:慢慢发 由小到大
第二个就是这个拥塞避免,线性的增长
第三个就是一个那个就是我们的快重传,你不回我我就快点再发一次,不等那么久
以及最后一个快恢复
