20165104 Meng Fanbin-Ninth week homework

20165104 Meng Fanbin-Ninth week homework

JAVA ninth week homework requirements learning summary Chapter 13, java learning can be said to have completed more than half, slowly I also got used to such a high-intensity learning progress, and sometimes I will be a little lazy (although I know this is wrong) Next, set a goal for yourself to learn java, that is, keep sticking to it, don't fall behind, and complete the learning of java on time and quantity.


Textbook learning content summary

Chapter 12

  • URL class

Construction method

try {  URL url = new URL("http://www.google.com");
}
catch(MalformedURLException e) {
   System.out.println("Bad URL:"+url);
}

or with

public URL(String protocol,String host,String file) throws MalformedURLException
  • InetAddress class to get the address

1. Get the host address on the InetAddress and use the static method getByName(String s)

2. To get the local machine address, use the static method getLocalHost()

  • socket

    The combination of source IP address and destination IP address and source port number and destination port number is called a socket. It is used to identify the server and service requested by the client.
    It is an abstract representation of endpoints in the network communication process, and contains five kinds of information necessary for network communication: the protocol used for the connection, the IP address of the local host, the protocol port of the local process, the IP address of the remote host, and the protocol of the remote process. port.

  • ServerSocket objects and server-side sockets
  • Use multithreading technology

(The picture is made by myself, please forgive me for the flaws)

  • Datagram

    The basic unit of data transmitted over the network, including a header (header) and the data itself, where the header describes the destination of the data and the relationship with other data.

  • java remote call

Code cloud link

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324894389&siteId=291194637