Operation Modes Flashcards
According to your text, what are re-entrant messages?
messages your application receives while a blocking operation is outstanding
According to the book, what is an advantage of threads?
you can create an application that handles many sockets simultaneously and uses blocking sockets
According to the book, what is a disadvantage of threads?
Any program using them is not as portable to 16-bit Windows.
What are the four types of timeouts for blocking operations?
automatic timeouts
user-settable timeouts
application timeouts
TCP keep-alive timeouts
What are the three possible operation modes of Windows Sockets functions?
blocking, nonblocking, asynchronous
What is meant by the term fake blocking?
Fake blocking means that although your application waits for the network operation to complete the WinSock DLL yields as you wait.
What option is the default for closesocket() that blocks only if you have a blocking socket and set a nonzero timeout by calling setsockopt() to enable the SO_LINGER option?
SO_DONTLINGER
Which socket functions time-out automatically, and are controlled completely by the network system?
a. connect, send, gethostbynature
b. connect, recv, gethostbyname
c. connect, send, gethostbyname
d. connect, recv, gethostbyagebyname
c. connect, send, gethostbyname
Which Window Sockets operation mode, “transfers data quickly, yet remains friendly”?
a. all of them transfer data based upon the current weather conditions
b. Asynchronous
c. Non-Blocking
d. Blocking
b. Asynchronous
What three functions can block forever and have no time limit?
recv(), recvfrom(), accept()
What two functions allow an application to determine a timeout value?
select() and closesocket()
__________mode is the “friendliest” but is relatively slow.
Blocking
___________operation mode is the fastest, but requires the most overhead.
Nonblocking
A Windows Sockets function returns only when the operation completes in _____________ operation mode.
blocking
According to your text, which asynchronous function is considerd to be the most significant?
WSAAsyncSelect()