Suppose I want a single server that can serve requests over both HTTP (port 80) and HTTPS (port 443). To do this I would need to ~ create a single stream socket bound to both ports and listen on it ~ create a single datagram socket bound to both ports and recv on it ~+ create two stream sockets, one bound to each port, and listen on both of them ~ create two datagram sockets, one bound to each port, and recv on both of the ~~ After creating two stream sockets and listening on both of them as in the previous question, the code would then have to: ~ alternately call receive on the two sockets ~ alternately call accept on the two sockets ~ simultaneously (somehow) call recv on the two sockets ~+ simultaneously (somehow) call accept on the two sockets ~~ After successfully accepting a connection, the server would: ~ send and receive on the listening socket ~ send and receive on the bound socket ~+ send and receive on the socket returned by accept ~ send and receive on the socket returned by connect ~~ After successfully connecting to the server, the client would: ~ send and receive on the listening socket ~ send and receive on the socket returned by connect ~+ send and receive on the socket returned by socket