1. How does the remote client determine when a command's output is fully received from the server, and what techniques can be used to handle partial reads or ensure complete message transmission?
1. How does the remote client determine when a command's output is fully received from the server, and what techniques can be used to handle partial reads or ensure complete message transmission?
_answer here_
_It determines by specific things, so for this one we use a null terminator or eof to see when a message is over. We can buffer incoming data, or predefined limiters, or length prefixing_
2. This week's lecture on TCP explains that it is a reliable stream protocol rather than a message-oriented one. Since TCP does not preserve message boundaries, how should a networked shell protocol define and detect the beginning and end of a command sent over a TCP connection? What challenges arise if this is not handled correctly?
2. This week's lecture on TCP explains that it is a reliable stream protocol rather than a message-oriented one. Since TCP does not preserve message boundaries, how should a networked shell protocol define and detect the beginning and end of a command sent over a TCP connection? What challenges arise if this is not handled correctly?
_answer here_
_It should frame the message, so that it has proper lengths, or delimiters, and EOF characters and stuff that like. It needs proper handling so that the commands may be interpreted correctly_
3. Describe the general differences between stateful and stateless protocols.
3. Describe the general differences between stateful and stateless protocols.
_answer here_
_Stateful protocols maintain information across multiple requests, while stateless protcols don't._
4. Our lecture this week stated that UDP is "unreliable". If that is the case, why would we ever use it?
4. Our lecture this week stated that UDP is "unreliable". If that is the case, why would we ever use it?
_answer here_
_UDP is low latency and a very fast so it's very useful when you need information quickly._
5. What interface/abstraction is provided by the operating system to enable applications to use network communications?
5. What interface/abstraction is provided by the operating system to enable applications to use network communications?
_answer here_
_Operating systems use socket interfaces, and that allows these applications to perform network communications over protocols._