Java Basics-Network programming

Source: Internet
Author: User

Network programming:

TCP protocol:
Before using the TCP protocol, a TCP connection must be established to form a transport data channel
It is reliable to use the "three-time handshake" method before transmission.
Two application processes for communication with the TCP protocol: client, server
Large amount of data transfer in connection
The transmission is complete, the established connection needs to be released, the efficiency is low
UDP protocol:
Encapsulates data, sources, and purposes into packets without establishing a connection
Limit the size of each datagram within 64K
It is unreliable due to the need for no connection
No need to release resources at the end of sending data, fast
Socket
Using sockets to develop Web applications has long been widely adopted as a de facto standard.
Sockets are needed on both ends of the communication and are the endpoints of communication between the two machines.
Network communication is actually the communication between sockets.
The socket allows the program to treat the network connection as a stream, and the data is transmitted via IO between two sockets.
An application that typically initiates communication is a client that waits for a communication request
As a service-side

URL programming
URL (Uniform Resource Locator): A Uniform Resource locator that represents the address of a resource on the Internet.
Through the URL we can access various network resources on the Internet, such as the most common www,ftp site. The browser can find the appropriate file or other resource on the network by parsing the given URL.

Java Basics-Network programming

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.