Operation Modes Flashcards Preview

Multi-User Game Programming > Operation Modes > Flashcards

Flashcards in Operation Modes Deck (20)
Loading flashcards...
1

According to your text, what are re-entrant messages?

messages your application receives while a blocking operation is outstanding

2

According to the book, what is an advantage of threads?

you can create an application that handles many sockets simultaneously and uses blocking sockets

3

According to the book, what is a disadvantage of threads?

Any program using them is not as portable to 16-bit Windows.

4

What are the four types of timeouts for blocking operations?

automatic timeouts

user-settable timeouts

application timeouts

TCP keep-alive timeouts

5

What are the three possible operation modes of Windows Sockets functions?

blocking, nonblocking, asynchronous

6

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.

7

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

8

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 

9

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 

10

What three functions can block forever and have no time limit?

recv(), recvfrom(), accept()

11

What two functions allow an application to determine a timeout value?

select() and closesocket()

12

__________mode is the "friendliest" but is relatively slow.

Blocking

13

___________operation mode is the fastest, but requires the most overhead. 

Nonblocking 

14

A Windows Sockets function returns only when the operation completes in _____________ operation mode.

blocking

15

According to your text, which asynchronous function is considerd to be the most significant?

WSAAsyncSelect()

16

What option can be set in setsockopt() to enable a timeout on a stream socket?

SO_KEEPALIVE

17

True or False

A blocking function call returns immediately whether or ont the relevant network operation has completed.

False

18

True or False

If a non-blocking socket function returns indicating there was success, it may not mean it did exactly what you asked.

True

19

True or False

Non-blocking calls wait for operations to complete before returning to the calling application.

False

20

True or False

A socket returned from the socket() function operates in nonblocking mode by default.

False