- Is it ever acceptable just to terminate a program if a network error is detected?
Yes. For some applications terminating on error is the right call. For more substantial applications, the ability to retry and continue on may be needed.
- Which system functions are used to convert error codes into text descriptions?
You can use FormatMessage() on Windows and strerror() on other platforms to obtain error messages.
- How long does it take for a call to connect() to complete on a TCP socket?
A call to connect() typically blocks for at least one network time round trip while the TCP three-way handshake is being completed.
- What happens if you call send() on a disconnected TCP socket?
On Unix-based systems, your program can receive a SIGPIPE signal. It is important to plan for that. Otherwise, send...