System::Net::ServicePoint::SetTcpKeepAlive 方法

ServicePoint::SetTcpKeepAlive method

设置指示是否启用 ‘Keep-Alive’ 选项的值。

void System::Net::ServicePoint::SetTcpKeepAlive(bool enabled, int32_t keepAliveTime, int32_t keepAliveInterval)
参数类型描述
已启用bool指示 ‘Keep-Alive’ 选项是否已启用的值。
keepAliveTimeint32_t在首次发送 ‘Keep-Alive’ 包之前的超时时间(毫秒)。
keepAliveIntervalint32_t发送 ‘Keep-Alive’ 包之间的超时时间(毫秒)。

另见