socket programming

Socket programming:
Socket is an intermediate abstraction layer between the application layer and the tcp/ip protocol family. It is a set of interfaces. In the design mode,
socket is actually a facade mode, which hides the complex tcp/ip protocol family in the socket interface. Later, for the
user, a simple set of interfaces is all there is to let the socket organize the data to conform to the specified protocol.
Therefore, we do not need to deeply understand the tcp/ip protocol, the socket has been encapsulated for us, we need to follow
the socket regulations to program, and the written program naturally follows the tcp/udp standard.
Processes on the same host cannot communicate directly.

Socket workflow:

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325076458&siteId=291194637