[ee122] keep-alive

Daniel Killebrew dank at eecs.berkeley.edu
Sat Oct 13 13:41:15 PDT 2007


The server and the client do the same thing they did in phase 1, except 
now, the server will not close the connection after sending the response 
to the client's first request. This way the client can send multiple 
requests without reconnecting for each. So the server and client are 
reusing the sockets they have already created.


Daniel

Davide Cerri wrote:
> Hello,
> I am having trouble to understand how to implement keep-alive. Precisely:
> Lets say i create a server that talks on port 80.
> when i first connect the client to port 80 of the server, the server
> creates a new socket for me to talk. Then if as a client i try to talk
> again to port 80 my server tells me that it already created a socket
> for me and returns and error.
>
> do i have to set my client to send messages to the port i was
> assigned, or do i have to have the server redirect the message to the
> correct file descriptor?
>
>
>
>   


More information about the ee122 mailing list