TCP/IP Keepalive

P

Philip Mak

Is there a way an application can explicitly send a TCP/IP Keepalive
packet? If so, how would I do this?
 
Z

Zane Dodson

Hello Philip,

On Mon, Sep 01, 2003 at 08:42:35AM +0900, Philip Mak wrote:
| Is there a way an application can explicitly send a TCP/IP Keepalive
| packet? If so, how would I do this?

If you mean the keepalives generated when the SO_KEEPALIVE socket
option is set, then the answer is no. The generation of keepalives
is done by the operating system's IP stack in response to a
keepalive timer expiring for an idle connection. There are
generally some configuration parameters to control keepalives
(keepalive time interval, maximum number of keepalives to send
before giving up, etc.), but these are system-wide parameters, not
per socket. It is usually not a good idea to change them for this
reason. See RFC 1122.

If you need more control, you will probably need to implement
keepalives in your application-level protocol. Examples of this
usage are routing daemons and the OpenSSH client ssh (see the
ProtocolKeepAlives config option).

Best regards,
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top