Changeset 100171 in vbox for trunk/include
- Timestamp:
- Jun 13, 2023 9:07:56 PM (18 months ago)
- Location:
- trunk/include/iprt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/iprt/mangling.h
r100037 r100171 2472 2472 # define RTTcpServerListen2 RT_MANGLER(RTTcpServerListen2) 2473 2473 # define RTTcpServerShutdown RT_MANGLER(RTTcpServerShutdown) 2474 # define RTTcpSetBufferSize RT_MANGLER(RTTcpSetBufferSize) 2475 # define RTTcpSetKeepAlive RT_MANGLER(RTTcpSetKeepAlive) 2474 2476 # define RTTcpSetSendCoalescing RT_MANGLER(RTTcpSetSendCoalescing) 2475 # define RTTcpSetBufferSize RT_MANGLER(RTTcpSetBufferSize)2476 2477 # define RTTcpSgWrite RT_MANGLER(RTTcpSgWrite) 2477 2478 # define RTTcpSgWriteL RT_MANGLER(RTTcpSgWriteL) -
trunk/include/iprt/tcp.h
r98103 r100171 310 310 311 311 /** 312 * Enables or disables sending of periodic keep-alive messages on a socket. 313 * Also set values relating to TCP keep-alive messages on a socket. The TCP 314 * keep-alive mechanism is described in RFC 1122 which states: 315 * "Keep-alive packets MUST only be sent when no data or acknowledgement 316 * packets have been received for the connection within an interval. This 317 * interval MUST be configurable and MUST default to no less than two hours." 318 * The following per-socket options allow fine-tuning the keep-alive interval, 319 * frequency, and timeout when SO_KEEPALIVE has been set for the socket. 320 * 321 * @returns iprt status code. 322 * @retval VERR_NOT_SUPPORTED is returned if these keep-alive options aren't 323 * supported by the OS. 324 * 325 * @param hSocket Socket descriptor. 326 * @param fEnable When set to true enables keep-alive messages. 327 * @param cSecsIdle The amount of time, in seconds, that the connection must be idle before 328 * keep-alive probes are sent for this socket. (TCP_KEEPIDLE (TCP_KEEPALIVE on macOS)) 329 * If zero then the system default is used (the default value varies by OS 330 * but is typically 2 hours (7200 seconds)). 331 * @param cSecsInterval The amount of time, in seconds, between each keep-alive probe sent to a 332 * peer. (TCP_KEEPINTVL) 333 * If zero then the system default is used (the default value varies by OS 334 * but is typically 75 seconds). 335 * @param cFailedPktsBeforeClose The number of keep-alive probes to send which receive no response before 336 * closing the connection. (TCP_KEEPCNT) 337 * If zero then the system default is used (the default value varies by OS 338 * but is typically 8 packets). 339 */ 340 RTR3DECL(int) RTTcpSetKeepAlive(RTSOCKET hSocket, bool fEnable, uint32_t cSecsIdle, uint32_t cSecsInterval, 341 uint32_t cFailedPktsBeforeClose); 342 343 /** 312 344 * Socket I/O multiplexing. 313 345 * Checks if the socket is ready for reading.
Note:
See TracChangeset
for help on using the changeset viewer.