当前位置:网站首页>Reuse and distribution
Reuse and distribution
2022-07-02 14:37:00 【Kallou】
Multiplexing and demultiplexing are the services that the transport layer protocol must provide .
Multiplexing and multiplexing are common in the process of network transmission , Unique to the non transport layer .
1. An example

host1 Of p3 Process to host2 Of p1 Process transfer information , meanwhile host3 Of p4 Process also to host2 Of p2 Process transfer information .
For the receiver , The transport layer at the receiving end identifies the arriving multiple transport layer messages , extract socket Information , Locate the message segment to the corresponding socket On , The process is called Demultiplexing .
For the sender , From different socket Collect information and add the first part , Send it through the network layer , be called Multiplexing .
2. The specific working mode of multiplexing
The host receives a IP The datagram , The IP Datagram carry Source IP Address and Purpose IP Address . Yes IP After the datagram is unpacked, a transport layer segment,segment There is Source port number and Destination port number , Corresponding Source process and Destination process , The transport layer protocol distributes data correctly according to the port number .

3. Connectionless distribution (UDP)
Features of connectionless distribution :
- establish socket, And will socket Bind to a port number ,UDP Use Purpose IP Address and Destination port number The unique identifier of a binary socket
- Host received UDP After paragraph , Check the destination port number ,UDP The segment is connected to socket.
- From different hosts and transmitted to the same process UDP Segments will be connected to the same socket On .

4. Connection oriented distribution (TCP)
Connection oriented features :
- TCP Adopt include Source IP Address 、 Source port number 、 Purpose IP Address 、 Destination port number To identify socket.
- TCP The protocol is connection oriented ( Point to point ) agreement , Reflected in the transport layer is that the receiving process will be from each different source TCP Segment creation socket.
Multi process connection oriented sharing :

Due to the high cost of creating and maintaining processes , Usually the server will adopt a lower cost method , That is to create a process Multiple threads To communicate with clients , Each thread will have its own socket.
Multithreaded connection oriented sharing :

边栏推荐
- 删除元素(带过渡动画)
- Teamtalk source code analysis win client
- OpenCV调用USB摄像头的点滴
- ONNX+TensorRT:将预处理操作写入ONNX并完成TRT部署
- C语言高级用法--函数指针:回调函数;转换表
- TeamTalk源码分析之win-client
- Generally speaking, if the error of inconsistent tab and space occurs frequently
- NLA natural language analysis realizes zero threshold of data analysis
- 4、数组指针和指针数组
- Makefile 分隔文件名与后缀
猜你喜欢

腾讯云 TStor 统一存储通过信通院首批文件存储基础能力评测

fatal: unsafe repository is owned by someone else 的解决方法

Default slot, named slot, scope slot

Pycharm连接远程服务器

Factal: Unsafe repository is owned by someone else Solution

TeamTalk源码分析之win-client

MQ教程 | Exchange(交换机)

【apipost】使用教程

Packet capturing tool Fiddler learning

Certik released the defi security report in 2021, disclosing key data of industry development (PDF download link attached)
随机推荐
PTA question bank== > complex four operations, one for one, examination seat number (7-73)
taobao. trade. memo. Add (add remarks to a transaction) interface, Taobao store flag insertion interface, Taobao order flag insertion API interface, oauth2.0 interface
Available solution development oral arithmetic training machine / math treasure / children's oral arithmetic treasure / intelligent math treasure LCD LCD driver ic-vk1622 (lqfp64 package), original te
Start to write a small demo - three piece chess
实现一个多进程并发的服务器
Pycharm连接远程服务器
Delete element (with transition animation)
fatal: unsafe repository is owned by someone else 的解决方法
卷积神经网络(入门)
threejs的控制器 立方體空間 基本控制器+慣性控制+飛行控制
Makefile separates file names and suffixes
Some interview suggestions for Android programmers "suggestions collection"
The evolution process of the correct implementation principle of redis distributed lock and the summary of redison's actual combat
求轮廓最大内接圆
[Hongke technology sharing] how to test DNS server: DNS performance and response time test
博睿数据一体化智能可观测平台入选中国信通院2022年“云原生产品名录”
Essential elements of science fiction 3D scenes - City
Using computed in uni app solves the abnormal display of data () value in tab switching
Fabric.js 动态设置字号大小
Generally speaking, if the error of inconsistent tab and space occurs frequently