当前位置:网站首页>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】Exam Summary: Depth-First Search (DFS)
好用的项目工时管理系统有哪些
爬百度图片
Fluorescein-PEG-CLS,胆固醇-聚乙二醇-荧光素用于缩短包封周期
【20210923】Choose the research direction you are interested in?
Tensorflow教程(四)——MNIST项目入门
【CC3200AI 实验教程4】疯壳·AI语音人脸识别(会议记录仪/人脸打卡机)-GPIO
[In-depth study of 4G/5G/6G topic-54]: L3 signaling control-3-segmentation of software functions and processes-signaling of CU-UP network elements
中金财富开户安全吗?怎么操作?
laravel-practice
L2-013 红色警报 (25 分)(并查集)
vi编辑器命令
MySQL 数据库
Qt——获取文件夹下所有子文件名称
c语言指针运算
leetcode:296.最佳的碰头地点
banner 如何显示drawable图片
Nervegrowold: machine advanced learning advice
Appium 自动化测试环境搭建
JVM内存模型和结构详解(五大模型图解)