当前位置:网站首页>传输层 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连接中。
边栏推荐
- Work experience of a hard pressed programmer
- Key wizard play strange learning - multithreaded background coordinate recognition
- Why can't the start method be called repeatedly? But the run method can?
- Do not log in or log in to solve the problem that the Oracle database account is locked.
- The industrial scope of industrial Internet is large enough. The era of consumer Internet is only a limited existence in the Internet industry
- [Arduino experiment 17 L298N motor drive module]
- Mathematical knowledge: step Nim game game game theory
- Using tensorboard to visualize the model, data and training process
- 【无标题】
- [FPGA tutorial case 5] ROM design and Implementation Based on vivado core
猜你喜欢
Basis of information entropy
leetcode 6103 — 从树中删除边的最小分数
Find a benchmark comrade in arms | a million level real-time data platform, which can be used for free for life
软考信息系统项目管理师_历年真题_2019下半年错题集_上午综合知识题---软考高级之信息系统项目管理师053
给你一个可能存在 重复 元素值的数组 numbers ,它原来是一个升序排列的数组,并按上述情形进行了一次旋转。请返回旋转数组的最小元素。【剑指Offer】
Excel if formula determines whether the two columns are the same
Top ten regular spot trading platforms 2022
Basic remote connection tool xshell
Asynchronous, email and scheduled tasks
Give you an array numbers that may have duplicate element values. It was originally an array arranged in ascending order, and it was rotated once according to the above situation. Please return the sm
随机推荐
机器学习术语
What operations need attention in the spot gold investment market?
看疫情之下服装企业如何顺势而为
Kivy tutorial how to create drop-down lists in Kivy
[my advanced journey of OpenGL learning] collation of Euler angle, rotation order, rotation matrix, quaternion and other knowledge
MySQL foundation 07-dcl
Telephone network problems
MySQL - database query - basic query
Look at how clothing enterprises take advantage of the epidemic
Using tensorboard to visualize the model, data and training process
d. LDC build shared library
产业互联网的产业范畴足够大 消费互联网时代仅是一个局限在互联网行业的存在
Arduino dy-sv17f automatic voice broadcast
Concise analysis of redis source code 11 - Main IO threads and redis 6.0 multi IO threads
[C language] detailed explanation of pointer and array written test questions
wirehark数据分析与取证A.pacapng
[FPGA tutorial case 6] design and implementation of dual port RAM based on vivado core
Uniapp component -uni notice bar notice bar
What is tone. Diao's story
Excel if formula determines whether the two columns are the same