TcpKeepAlive Structure |
Namespace: VirtualRadar.Interop
The TcpKeepAlive type exposes the following members.
Name | Description | |
---|---|---|
BuildBuffer |
Returns a managed array of bytes representing the struct content.
| |
Equals | Indicates whether this instance and a specified object are equal. (Inherited from ValueType.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Returns the hash code for this instance. (Inherited from ValueType.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns the fully qualified type name of this instance. (Inherited from ValueType.) |
Name | Description | |
---|---|---|
KeepAliveInterval |
The interval in milliseconds between successive keep-alive packets.
| |
KeepAliveTime |
The timeout in milliseconds.
| |
OnOff |
Indicates whether TCP keep-alive is enabled or disabled.
|
See http://msdn.microsoft.com/en-us/library/dd877220(VS.85).aspx, C version is tcp_keepalive and is associated with SIO_KEEPALIVE_VALS control code.
By default BeginRead on a socket will wait forever with no heartbeat. If the connection breaks you get no indication. By specifying a hearbeat check with SIO_KEEPALIVE_VALS you can force it to throw a SocketException after a connection has remained broken for a given period of time.