Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
10 Cards in this Set
- Front
- Back
What is a socket?
|
A socket is an interface between a user application and the operating system. Inter process communication uses sockets
|
|
What is a port?
|
Identifier for a socket on which a process is listening. 16 bit. A process can listen on more than one socket they each need their own port
|
|
Why does the BSD socket API dene a generic socket address structure? Give an example of
why this is useful |
It can give the operating system the ability to different addressing standards. That way the same system and calls could be used for local and internet applications and processes
|
|
Why does the BSD socket API require that all quantities are sent in network byte order
|
This allows a good interoperability between internet hosts. This way different processors can talk to eachother (ie Intel, AMD)
|
|
1st server socket call
|
create_socket:
|
|
2nd server socket call
|
bind:
|
|
3rd server socket call
|
listen:
|
|
4th server socket call
|
accept:
|
|
Explain two dierent ways that an application protocol can use to determine how much it needs
to read from a socket in order to receive an entire message. |
variable length: read until sentinel
known length: real until number of bytes received. |
|
Why do the recv() and send() socket operations need to be called in a loop by the application
protocol? |
Because there is no guarantee that you will get the entire message in one byte.
|