« Home « Chủ đề Lecture Network programming

Chủ đề : Lecture Network programming


Có 10+ tài liệu thuộc chủ đề "Lecture Network programming"

Lecture Network programming - Chapter 1: Basic Network Concepts (Tran Thi Ha Trang)

tailieu.vn

The layer of a Network 3. IP Address. A network is a collection of computers and other devices that can send data to and receive data from others in real time.. Each machine on a network is called a node.. Every network node has an address - a sequence of bytes that uniquely identifies it - assigned by ISP.. Data...

Lecture Network programming - Chapter 2: Streams (Tran Thi Ha Trang)

tailieu.vn

Input streams 3. Input Streams Chains. Class java.io.OutputStream. Input Streams. Class java.io.InputStream. The java.io.Reader class specifies the API by which characters are read. The java.io.Writer class specifies the API by which characters are written. Besides, java.io pakage provides several raw reader and writer classes:

Lecture Network programming - Chapter 3: Threads (Tran Thi Ha Trang)

tailieu.vn

Many different thread run within one process.. Returning Information from a Thread 3. Thread Scheduling. Running Thread. Returning Information from a Thread. VM will generally run only the highest-priority thread.. You can change the priority of the thread using the setPriority() method. There are two main kinds of thread scheduling: preemptive and cooperative.. A preemptive thread scheduler determines when a...

Lecture Network programming - Chapter 4: Internet Address (Tran Thi Ha Trang)

tailieu.vn

The getHostAddress() method returns a string contains the IP address.. The getByName() method returns a NetworkInterface object representing the network interface with the. The getByInetAddress() method returns a. The getNetworkInterfaces() method returns a. The getInetAddresses() method returns a. The getName() method returns the name of a particular NetworkInterface object

Lecture Network programming - Chapter 5: URLs and URIs (Tran Thi Ha Trang)

tailieu.vn

The URL Class 3. The URI Class. path: is filesystem path of the resource on the server. The web browser will load the URL: http://www.ibiblio.org/. The URL Class. The java.net.URL class has several constructors:. All these constructors throw a MalformedURLException if the URL use unsupported protocol or is syntactically. For example:. For example: . In applets, getDocumentBase() returns the URL...

Lecture Network programming - Chapter 6: HTTP (Tran Thi Ha Trang)

tailieu.vn

the client requests data from the server. the server responds to that request. the client sends a message to the server requesting the resource at a specified path.. the server sends a response to the client.. the connection is closed by the server.. In HTTP 1.1 and later, multiple requests and responses can be sent in series over a single...

Lecture Network programming - Chapter 7: URL Connections (Tran Thi Ha Trang)

tailieu.vn

interaction with a server than the URL class. It can inspect the header sent by the server and respond accordingly. It can set the header fields used in the. Configuring the Connection. A program uses the URLConnection class directly follows the basic sequence of steps:. Invoke the URL object’s openConnection() method to retrieve a URLConnection. Configure the URLConnection 4. Read...

Lecture Network programming - Chapter 8: Sockets for Clients (Tran Thi Ha Trang)

tailieu.vn

Connect to a remote machine. Java’s Socket class, which is used by both clients and servers, has methods that correspond to the first four of these operations.. The last three operations are needed only by servers, which waits for clients to connect to them. The socket attempts to connect to the remote host.. hosts get input and output streams from...

Lecture Network programming - Chapter 9: Sockets for Servers (Tran Thi Ha Trang)

tailieu.vn

In essence, a server socket’s job is to sit by the. server socket runs on the server and listens for incoming TCP connections.. When a client on a remote host attempts to connect to that port, the server wakes up, negotiates the connection. Getting Information About a Server Socket 5. accept() method returns a Socket object connecting the client and...

Lecture Network programming - Chapter 10: UDP (Tran Thi Ha Trang)

tailieu.vn

If data is. lost or damaged in transmission, TCP ensures that data is resent. amount of time, particularly for protocols such as. HTTP, which tend to require many short transmissions.. transport layer protocol for sending data over IP that is very quickly but not reliable.. The UDP Protocol 2. UDP Clients. The DatagramPacket class 5. The DatagramSocket class 6. Socket...