Is there any benefit on Windows to use the WSA winsock functions compared to the BSD-style ones?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The most significant difference is the availability of Asynchronous Event style APIs in Winsock.
With Berkeley sockets, each time you
readorwriteyour application will ‘block’ until the network is ready, which could make your application unresponsive (unless the network I/O is handled in a different thread).With an async interface, you can arrange for a callback function to be called as part of the normal windows message loop each time data is received or when the transmit buffer is empty.