C # differences between Socket and TCP connections,
Introduction to layer-7 network communication reference models:Physical Layer: HUB, network cable link layer: MAC, ARP, switch network layer: IP, ICMP, IGMP, router transmission layer: TCP, UDP session layer: HTTP, SMTP, FTP, POP3 presentation layer: SOAP, SSL application layer: HTTP, POP3, etc.Difference Between TCP and Socket:Socket is a network layer operation. TcpClient is the operation on the transport layer.Use Socket to access the HTTP service:Network Layer --> transmission layer --> Session LayerUse TcpClient to access HTTP Services:Transport Layer --> the protocol at the Session Layer is IP, and the protocol at the transport layer is TCP. The essential difference is that the network layer adds data to the IP address, and the IP address serves all system ports. The transport layer only adds data to the port, that is, the operating system service port. The Network Layer/output layer provides connection-oriented and connectionless services.Application Selection of TcpClient and Socket in C:Only use TcpClient or UdpClient for host, port, and data transmission; use Socket for IP packets, routes, and IP packets;