TCP connection-based protocol that provides a reliable flow of data between two computers. TCP is based on a four-layered model. HTTP, FTP – High level protocol TCP, UDP – Open, maintain connection IP – Transmits packet from one IP add to another IP – Physical equipment such as twisted pair cables
Data transfer Ordered data transfer Retransmission of lost packets Error-free data transfer Flow control Congestion control
Java provides the java.net package to performsystem-independent network communication
Networking basics A computer generally has a single physicalconnection available for the network.
Port The physical connection is numbered within a range of 0 to65535, called Ports. Ranges from 0 to 1023 are reserved for HTTP, FTP … Data transmitted is accompanied with the destinationaddress and the port number.
URL Uniform Resource Locator a reference or an address to a resource onInternet. Two parts:
URL Resource name contains: Host name File name Port number
What different? http://vn.yahoo.com:80/index.html http://vn.yahoo.com/index.html http://vn.yahoo.com/