Socket is a set of programming APIs ). Provides unified programming interfaces to the application layer between the transport layer and the application layer. The Application Layer does not have to understand the TCP/IP protocol details. Data is transmitted over the IP network directly by calling the socket interface function.
Based on Transport Layer differences, four types of socket:
(1) TCP-based socket: provides reliable streaming data services to the application layer, using TCP socket applicationsProgramProtocol: BGP, HTTP, FTP, telnet, etc. Advantage: Data Transmission-based reliability.
(2) UDP-based socket: Applicable to scenarios with low data transmission reliability requirements. UDP-based socket applications or protocols include rip, SNMP, and L2TP.
(3) rawip-based socket: Non-connection and unreliable data transmission. Feature: enables applications to directly access the network layer. Rawip-based sockets include Ping, tracert, and OSPF.
(4) Link Layer-based socket. The socket interface provided for the is-is protocol. Enable the is-is protocol to directly access the link layer through socket. Non-connection and unreliable communication service