- How do sendto() and recvfrom() differ from send() and recv()?
The send() and recv() functions are useful after calling connect(). They only work with the one remote address that was passed to connect(). The sendto() and recvfrom() functions can be used with multiple remote addresses.
- Can send() and recv() be used on UDP sockets?
Yes. The connect() function should be called first in that case. However, the sendto() and recvfrom() functions are often more useful for UDP sockets.
- What does connect() do in the case of a UDP socket?
The connect() function associates the socket with a remote address.
- What makes multiplexing with UDP easier than with TCP?
One UDP socket can talk to multiple remote peers. For TCP, one socket is needed for each peer.
- What are the downsides...