Java socket programming (4) duplicate and concurrent servers

Source: Internet
Author: User

This applicationProgramIt is treated as a duplicate server. because it only accepts another connection after processing a process. more complex servers are concurrent. it allocates a thread for each request, instead of processing one. so it seems that it is processing multi-user requests at the same time. all commercial servers are concurrent servers.
Java dataReport Type
Unlike connection-oriented classes, the client-side and server-side classes of datagram are essentially the same. The following program creates a datagram between the client and the server-sideSockets:
Datagramsocket serversocket = new datagramsocket (4545 );
Datagramsocket clientsocket = new datagramsocket ();

Read: http://www.javah.net/wangluobiancheng/20070611/2620.html

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.