开发者

How to send a ACK packet in Solaris10

For tcp connection, is there any way to send an ACK packet to the other side without other data (only the ack packet) in Solaris 10.

开发者_如何学编程

I know we can do that through TCP Keep alive option, but it's supported in Solaris 10.


The reliable way to detect disconnection is to build a null / ping / echo type message into your application level protocol, and have your application send those at regular intervals. If it doesn't get a timely answer, it can assume the connection has been dropped. Most protocols that are intended to involve long-lived connections include such a message (for example, IRC, IMAP and SSH all do).

(After all, even if you could send bare TCP ACK messages, the other end doesn't have to respond to them, since it has recieved no more data to ACK itself).


If you're just receiving, the TCP stack will send plenty of ACKs without data all by itself. There's no way whatsoever to send an ACK of any kind from an application however.


You first posting states Solaris 10 is supporting TCP keep alives and later that it doesn't ...

Solaris supports setting tcp keepalive globally with the ndd command, eg:

ndd -set /dev/tcp tcp_keepalive_interval 120000

OpenSolaris and Solaris 11 Express support per socket keepalive settings. You can enable it with SO_KEEPALIVE and tune it with TCP_KEEPALIVE_THRESHOLD and TCP_KEEPALIVE_ABORT_THRESHOLD.

http://docs.oracle.com/cd/E19082-01/819-2254/6n4iaov75/index.html

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜