Win32 socket blocking and non-blocking functions and settings

Source: Internet
Author: User

Some functions in the Win32 socket are blocked by default, such as accept (), send (), recv (), and so on, where the blocking concept of Send () and recv () differs from the blocking concept of accept ().

Send () and recv () are just a copy of the data, that is, the Send () function simply puts the data into the send buffer, and the actual sending work is done by the network protocol; the recv () function simply reads the data from the receive buffer. The operation that actually receives the data is done by the network protocol. The blocking of Send () is primarily caused by the sending of data to fill the send buffer, and the blocking of recv () is due to no data being read in the receive buffer.

socket blocking and non-blocking settings are performed by the function Ioctrlsocket () function, and the corresponding blocking time limit is Number of setsockopt () to set . See Resources.

Reference 1 related setup functions

Reference 2 Related concepts


Win32 socket blocking and non-blocking functions and settings

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.