Infinity.Keepalive¶
Fields¶
| Name | Type | Access | Description | 
|---|---|---|---|
| enabled | bool | r/w | Whether sending keep-alive probes is enabled or not. | 
| interval | int | r/w | Time in seconds between keep-alive probes. | 
| mask | Infinity.KeepaliveMask | r/w | Which of the following settings are enabled. If a setting is disabled, then the system default is taken. | 
| time | int | r/w | Time in seconds after which to send keep-alive probes. | 
Methods¶
| apply(socket, current_mask) | |
| copy() | |
| free() | |
| load_default(mask) | 
Details¶
- 
class Infinity.Keepalive¶
- This structure contains the settings to configure keep-alive on TCP connections. - 
apply(socket, current_mask)¶
- Parameters: - socket (int) – The socket to which to apply the keepalive settings.
- current_mask (Infinity.KeepaliveMask) – The mask of currently applied keepalive settings on the socket, orInfinity.KeepaliveMask.ALLif unknown.
 - Raises: - Returns: - Return type: - Sets the keepalive settings of self for the socket socket. This function abstracts away the platform-dependent configuration of keepalives. - If current_mask is not - Infinity.KeepaliveMask.ALL, it can help this function to not do some unneccessary system calls.
- socket (
 - 
copy()¶
- Returns: - A copy of self. Free with - Infinity.Keepalive.free().- Return type: - Infinity.Keepalive- Makes a dynamically allocated copy of self. This is typically not needed, since the structure can be copied by value, but might prove useful for language bindings. 
 - 
free()¶
- Frees a - Infinity.Keepaliveobtained with- Infinity.Keepalive.copy().
 - 
load_default(mask)¶
- Parameters: - mask ( - Infinity.KeepaliveMask) – A mask that specifies which values to obtain.- This function attempts to obtain the default keepalive settings from the system. If it cannot obtain the default settings, the documented standard values for the host platform are used. - Only the values specified in mask are obtained, and other fields in self are left untouched. 
 
-