Hi Ryan,
SocketOptionName.KeepAlive must be associated with a TCP Socket and supplied
as a Boolean value, true or false, to the SetSocketOption method.
See section 4.2.3.6 TCP Keep-Alives of RFC 1122 for the standardized
design:
http://www.faqs.org/rfcs/rfc1122.html
In short, enabling keep-alives causes a packet to be sent every 2 hours, by
default, to keep the connection alive when there has been no data sent by
the application within that 2 hour period. In practice, however, a Socket
connection will be closed long before that 2 hour period if no data is sent
within that interval.
- David Sexton
"Ryan Liu" <ad********@online.sh.cnwrote in message
news:O0**************@TK2MSFTNGP03.phx.gbl...
Hi,
SocketOptionName.KeepAlive is a bool or an int value?
Is it "belongs to" SocketOptionLevel.Socket?
What does value 0 means? Is that meaning always "keep alive", or never
"send
keep-alives"?
And what does "Send keep-alives" mean anyway?
Thanks a million?
Ryan