Created
October 21, 2014 17:29
-
-
Save parachvte/61737700d3520a7bf300 to your computer and use it in GitHub Desktop.
[Network Programming] Homework 2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 请比较select模型与WSAEventSelect模型两者之间的差异? | |
| Deadline: Oct 27, 2014 |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Compatibility:
select()works on any platform with BSD sockets, andWSAEventSelectonly works on platform with Winsock.Mechanism:
fd_sets(readfds,writefdsanderrorfds), and if necessary, performs synchronous I/O.Eventobject. Once network events(FD_XXX) are occur, events are set to be signaled. Call theWSAWaitForMultipleEvents()function to return the index of signaled event objects.To summarize, select model is ACTIVE, and WSAEventSelect model is PASSIVE. So WSAEventSelect model works much faster than select model does.