1. Communication between processes
A process is a running program, and the task of a process is to execute the code in the program.
There are two processes on a computer network that only need to focus on the specifics of their communication, without needing to focus on the specifics of the message being transmitted over the network.
2. The concept of computer networks
Services provided by the Internet include the WWW service, e-mail service, File Transfer Service (FTP), Remote Login service (telnet). Users around the world can access information on the Internet or conduct a variety of businesses through or through these services.
3.UDP and TCP
Two processes can occupy the same port number, but must be different transport layer protocol, such as a process using TCP protocol, occupy 7000 port, then there can be a process using the UDP protocol, It also occupies 7000. The port is not a physical port of real existence, but is logically present to differentiate the processes.
4.socket sockets
The transport layer provides socket sockets to the application layer, the socket encapsulates the underlying data transfer details, and the application layer's program uses the socket to establish a connection to the remote host and to transmit data.
At the application layer's point of view, a communication process between two processes starts with establishing a connection, then exchanging data to end the disconnection. Sockets can be thought of as transceivers at both ends of a communication link, and the process is sending and receiving data through sockets.
There are three types of sockets in Java: Java.net.Socket, Java.net.ServerSocket and Java.net.DatagramSocket. Where sockets and ServerSocket are based on the TCP protocol, Datagramsocket is based on UDP.
The Java Network program uses the client/server communication mode, and the Java Network program is committed to implementing the application layer.
Java Network Programming Learning notes (i)