## ServicePointManager::SetTcpKeepAlive method


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

```cpp
static void System::Net::ServicePointManager::SetTcpKeepAlive(bool enabled, int32_t keepAliveTime, int32_t keepAliveInterval)
```


| Parameter | Type | 描述 |
| --- | --- | --- |
| 已启用 | bool | 指示 'Keep-Alive' 选项是否已启用的值。 |
| keepAliveTime | int32_t | 在首次发送 'Keep-Alive' 包之前的超时时间（毫秒）。 |
| keepAliveInterval | int32_t | 发送 'Keep-Alive' 包之间的超时时间（毫秒）。 |

## 另见

* Class [ServicePointManager](../)
* Namespace [System::Net](../../)
* Library [Aspose.Page for C++](../../../)
