当前位置:网站首页>socket concept
socket concept
2022-08-08 17:18:00 【Wholehearted】
Socket:
Socket=Ip address+TCP/UDP+port.
Socket Socket= (IP address: port number), the representation method of socket is to write the port number after the IP address in dotted decimal.
Each transport layer connection is uniquely connected by two communication ends.The endpoints (that is, the two sockets) are determined.For example: if the IP address is 210.37.145.1 and the port number is 23, then the resulting socket is (210.37.145.1:23)
To communicate over the Internet, you need at least one pair of sockets, one running onThe client, we call it Client Socket, and the other running on the server side, we call it Server Socket [3] .
According to the way the connection is started and the target to be connected to the local socket, the connection process between sockets can be divided into three steps [3]:
(1) Server monitoring.
(2) Client request.
(3) Connection confirmation
1. Server monitoring
The so-called server monitoring means that the server-side socket does not locate the specific client socket, but is in a state of waiting for connection, and real-time monitoringNetwork status [3].
2. Client request
The so-called client request refers to the connection request made by the client's socket, and the target to be connected is the server-side socket.To do this, the client's socket must first describe the server's socket to which it wants to connect, point out the address and port number of the server-side socket, and then make a connection request to the server-side socket [3] .
3. Connection confirmation
The so-called connection confirmation means that when the server-side socket monitors or receives the connection request of the client-side socket, it will respond to the request of the client-side socket and establish anew thread and send the description of the server-side socket to the client.Once the client has confirmed this description, the connection is established.The server-side socket continues to be in a listening state, receiving connection requests from other client-side sockets
边栏推荐
猜你喜欢
leetcode:296.最佳的碰头地点
一、根据系统架构定位系统性能瓶颈
【开源教程2】疯壳·开源编队无人机-硬件资源简介
Acwing Week 63 [Unfinished]
The latest research from PNAS: 81% problem solving rate, neural network Codex opens the door to the world of advanced mathematics
Appium 自动化测试环境搭建
顺序表与链表结构及解析
DSPE-PEG-Biotin,385437-57-0,磷脂-聚乙二醇-生物素用于生物分子的检测和纯化
Charles MOCK 数据 htpps代理
leetcode:295. 数据流的中位数
随机推荐
APICloud AVM wraps date and time selection components
L2-017 人以群分 (25 分)
敏捷开发项目管理的一些心得
【 8.7 】 source code - card to LCM with GCD 】 【 】
L2-023 图着色问题 (25 分)
R文件找不到问题
1dp到底多大!
史上最强IDEA工具使用教程,你想要的全都有!
离线安装 Anaconda + TensorFlow
LeetCode_二叉树_中等_515.在每个树行中找最大值
LeetCode_Backtrack_Medium_491. Incrementing Subsequence
对于端口的粗浅理解
【NodeJs篇】fs文件系统模块
Subject: Ordered Queue
正则在js中的使用
六、Jmeter定时器
Appium 自动化测试环境搭建
leetcode:306. 累加数
L2-011 玩转二叉树 (25 分) (二叉树)
L2-010 排座位 (25 分) (DFS)