Win32 socket blocking and non-blocking functions and settings, win32socket

Source: Internet
Author: User
Tags socket blocking

Win32 socket blocking and non-blocking functions and settings, win32socket

Some functions in win32 socket are blocked by default, such as accept (), send (), recv (), etc. The blocking concepts of send () and recv () and accept () are as follows () the concept of blocking is different.

The send () and recv () functions only copy data, that is, the send () function only puts data into the sending buffer, and the actual sending work is completed by the network protocol; recv () the function only reads data from the receiving buffer, and the operation of actually receiving data is completed by the network protocol. The blocking of send () is mainly caused by the completion of the sending buffer, and the blocking of recv () is caused by the absence of data readable in the receiving buffer.

The socket blocking and non-blocking settings are completed by the ioctrlsocket () function, and the corresponding blocking time limit is set by the setsockopt () function.. For more information, see references.

Reference 1 related setting functions

References 2 Concepts


Related Article

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.