Java Network Communication Class introduction (Java.net package), network communication java.net
InetAddress class: Internet Protocol (IP) address
URL class: represents a unified resource identifier, which is a pointer to the Internet "resource. A resource can be a simple file or directory, or a reference to a more complex object, such as a query of a database or search engine. URLConnection class: used to read and write resources referenced by this URL. Procedure:
DatagramPacket class: This class indicates a datagram packet. A datagram packet is used to deliver a connectionless package. Each packet is routed only from one machine to another based on the information contained in the packet. DatagramSocket class: This class indicates the socket used to send and receive the datagram packet. A datagram socket is the sending or receiving point of the package delivery service. Each packet sent or received on a datagram socket is independently edited and routed. Multiple packages sent from one machine to another may have different routes or may arrive in different order.
Socket class: This class implements the client Socket (also known as "Socket ").
ServerSocket class: This class implements server sockets. The server socket waits for the request to be transmitted over the network. It performs some operations based on the request and may return results to the requester.