function EnableKeepAlive(KeepAliveTime: Integer; KeepAliveInterval: Integer = 100): Boolean;
bool __fastcall EnableKeepAlive(int KeepAliveTime, int KeepAliveInterval = 0x64);
Enables keep-alive packets for this channel's socket connection.
The EnableKeepAlive method enables keep-alive packets for the channel's socket connection.
Note: If the channel is idle for longer than
KeepAliveTime, then a
KeepAlivepacket is sent and a response is awaited for the given interval, before terminating the connection. The number of keep-alive packet retries is OS-specific and cannot be specified here.
EnableKeepAlive takes in two parameters, which are described in the following table:
The idle time, in milliseconds, before sending a keep-alive packet.
How long to wait, in milliseconds, before sending successive keep-alive packets when the previous one receives no response.