当前位置:网站首页>传输层 TCP主要特点和TCP连接
传输层 TCP主要特点和TCP连接
2022-07-03 01:06:00 【富士康质检员张全蛋】
TCP协议的主要特点
TCP是面向连接的传输层协议。(在正式传数据之前需要发3个数据包,这叫三次握手,建立了连接之后协商参数,比如缓存多大,接受的每个段是多少个字节)
每一条TCP连接只能有两个端点(end point),只能是点对点的(一对一,多播和广播都是不行的)。
TCP提供可靠交付的服务。也就是说,通过TCP连接传送的数据,无差错、不丢失、不重复且按序发送。
TCP提供全双工通信。(一但发送端和接收端建立了连接,那么可以使用这个连接双向通信)
面向字节流。TCP中的“流”(steam)指的是流入到进程或从进程流出的字节序列。(不管是网页还是图片等,都按照字节8比特,一个一个字节往缓存里面放,应用层交给传输层的是字节流,udp是报文,应用程序要传的内容全部给了udp协议)

IP网络提供的是不可靠传输
TCP是面向连接的运输层协议,在无连接的、不可靠的 IP 网络服务基础之上提供可靠交付的服务。为此,在 IP的数据报服务基础之上,增加了保证可靠性的一系列措施。

TCP面向字节流

将字节分成段,然后加上首部,首部有编号这些功能。
注意
TCP连接是一条虚连接而不是一条真正的物理连接。
TCP对应用进程一次把多长的报文发送到TCP的缓存中是不关心的。TCP限据对方给出的窗口值和当前网络拥塞的程度来决定一个报文段应包含多少个字节(UDP发送的报文长度是应用进程给出的)。
TCP可把太长的数据块划分短一些再传送。
TCP也可等待积累有足够多的字节后再构成报文段发送出去。
TCP的连接
TCP把连接作为最基本的抽象. 每一条 TCP连接有两个端点。
TCP连接的端点不是主机,不是主机的IP地址,不是应用进程,也不是运输层的协议端口。TCP连接的端点叫做套接字(socket)或插口。
端口号拼接到(contatenated with)IP 地址即构成了套接字。

套接字
一个IP+端口标识TCP的一端,这个就叫做套接字。

TCP连接 IP地址 套接字
TCP 连接就是由协议软件所提供的一种抽象。
TCP连接的端点是个很抽象的套接字,即(IP地址∶端口号)。
同一个 IP 地址可以有多个不同的 TCP连接。同一个端口号也可以出现在多个不同的 TCP连接中。
边栏推荐
- 【FPGA教程案例5】基于vivado核的ROM设计与实现
- [day 29] given an integer, please find its factor number
- Detailed explanation of Q-learning examples of reinforcement learning
- Leetcode 2097 - Legal rearrangement of pairs
- MySQL
- Using tensorboard to visualize the model, data and training process
- MySQL --- 数据库查询 - 基本查询
- LDC Build Shared Library
- Swiftui component Encyclopedia: using scenekit and swiftui to build interactive 3D pie charts (tutorial with source code)
- 产业互联网的产业范畴足够大 消费互联网时代仅是一个局限在互联网行业的存在
猜你喜欢

Matlab Doppler effect produces vibration signal and processing

Niu Ke swipes questions and clocks in

MySQL foundation 04 MySQL architecture
![[flutter] icons component (fluttericon Download Icon | customize SVG icon to generate TTF font file | use the downloaded TTF icon file)](/img/ca/1d2473ae51c59b84864352eb17de94.jpg)
[flutter] icons component (fluttericon Download Icon | customize SVG icon to generate TTF font file | use the downloaded TTF icon file)

Asynchronous, email and scheduled tasks

Why can't the start method be called repeatedly? But the run method can?
![[Androd] Gradle 使用技巧之模块依赖替换](/img/5f/968db696932f155a8c4a45f67135ac.png)
[Androd] Gradle 使用技巧之模块依赖替换

What is tone. Diao's story

MySQL basics 03 introduction to MySQL types

异步、郵件、定時三大任務
随机推荐
机器学习术语
对非ts/js文件模块进行类型扩充
Excel if formula determines whether the two columns are the same
异步、郵件、定時三大任務
Kivy教程大全之如何在 Kivy 中创建下拉列表
After reading this article, I will teach you to play with the penetration test target vulnhub - drivetingblues-9
一位苦逼程序员的找工作经历
Swiftui component Encyclopedia: using scenekit and swiftui to build interactive 3D pie charts (tutorial with source code)
Machine learning terminology
Test shift right: Elk practice of online quality monitoring
【FPGA教程案例5】基于vivado核的ROM设计与实现
Mathematical knowledge: divisible number inclusion exclusion principle
Database SQL language 02 connection query
Dotconnect for PostgreSQL data provider
uniapp组件-uni-notice-bar通告栏
JDBC courses
How wide does the dual inline for bread board need?
C#应用程序界面开发基础——窗体控制(4)——选择类控件
MySQL basic usage 02
不登陆或者登录解决oracle数据库账号被锁定。