Basic network programming knowledge, Network Programming
IP Address: each host in the network must have a unique IP address; IP address is a logical address; IP address on the internet is globally unique; 32-bit, 4 bytes, commonly used Dot-decimal format, for example, 192.168.0.200.
Protocol: rules, standards, or conventions (= semantics + syntax + rules) established for data exchange (communication) in the network. Different layers have different protocols.
Poor: data transmitted over the Internet contains IP addresses and port numbers used to identify the destination. The IP address is used to identify the computer on the network, and the port number is used to specify the application on the computer.
TCP: TCP is short for Transfer Control Protocol. It is a connection-oriented Protocol that ensures reliable transmission. It is transmitted over TCP to obtain a sequential error-free data stream. The sender and receiver must establish a connection between two pairs of sockets to facilitate communication based on the TCP protocol. When a socket (usually a server socket) is waiting to establish a connection, another socket can require a connection. Once the two sockets are connected, they can perform bidirectional data transmission, and both parties can send or receive data. TCP is a connection-based protocol that provides reliable data streams between two computers. Such reliable communication channels are required for applications such as HTTP, FTP, and Telnet.
UDP: UDP is short for User datav Protocol. It is a connectionless Protocol. Each Datagram is an independent information, including the complete source address or destination address, it is transmitted to the object in any possible path on the network. Therefore, it cannot be guaranteed whether the destination, the time to arrive at the destination, and the correctness of the content. UDP is a protocol that sends an independent data packet called a datagram to another computer. This Protocol does not guarantee that the datagram can arrive at the destination correctly. It is a non-connection-oriented protocol.