Tuesday, April 21, 2009

KEEPALIVE

Initialize tcp timers for the socket, call
tcp_init_xmit_timers() . Let ’ s see what it does. There are a minimum of three events
associated with any TCP connection for which a timer needs to be fi red:
• Retransmit event.
• Delayed acknowledgment (in case we are waiting for any data to be sent to
the other end). This timer will be fi red at a specifi ed time after a packet is
received from the other end.
• Keep event alive. (This timer is fi red if the KEEPALIVE option is set for the
socket. This end of the connection will keep on sending probe packets to the
other end when the connection is idle for some time. The timer that does the
probe is fi red.)
tp → retransmit_timer.function is initialized to tcp_write_timer() .
tp → delack_timer.function is initialized to tcp_delack_timer() .
tp → timer.function is initialized to tcp_keepalive_timer() .

No comments: