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 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 |
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, andWSAEventSelect
only works on platform with Winsock.Mechanism:
fd_sets
(readfds
,writefds
anderrorfds
), and if necessary, performs synchronous I/O.Event
object. 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.