An article takes you to fully understand socket (must be collected)

Table of contents

1. Socket Diagram

2. The working principle of Socket


1. Socket Diagram

Socket is the process communication mechanism of BSD UNIX, usually also called "socket", which is used to describe the IP address and port, and is the handle of a communication chain. Socket can be understood as the API of the TCP/IP network, which defines many functions or routines, and programmers can use them to develop applications on the TCP/IP network. Applications running on the computer usually send requests to the network or respond to network requests through "sockets".

Socket is an intermediate software abstraction layer for communication between the application layer and the TCP/IP protocol family. In the design mode, Socket is actually a facade mode, which hides the complex TCP/IP protocol family behind Socket. For users, they only need to call the relevant functions specified by Socket to let Socket organize data that conforms to the specified protocol and then proceed communication.

Guess you like

Origin blog.csdn.net/fanjufei123456/article/details/132017831