Java Network Communication Class introduction (Java.net package), network communication java.net

Source: Internet
Author: User

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.