Parameter implication of listen function in socket __ function

Source: Internet
Author: User
Problem Description:

I would like to ask you prawns, the parameters of the Listen function means:
1, how many customers can link to this service socket
2, through the Connect function to link the service socket, and is in the waiting service socket accept customer Socket number
---------------------------------------------------------------

Listen the meaning of the parameter should be the latter, is not can even the ф said Nao 苁 ?

Rather, it is the maximum queue length of a connection that is shelved at the same time, because it is entirely possible to have several server connection requests at the same time, so this parameter is very important.

As an example:

For example, the Listen parameter is 2, but at the same time 5 clients make connection requests at the same time, the head and ends are placed in the pending queue in order to serve them, but the latter three connect failed ^_^ and return wsaeconnrefused error.

If this parameter appears illegal, the system is replaced with the nearest legal value, typically set below 10

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.