VirtualBox

Changeset 100176 in vbox


Ignore:
Timestamp:
Jun 14, 2023 12:21:32 PM (18 months ago)
Author:
vboxsync
Message:

ValidationKit/TXS: Update the TestExecService client socket used in TCP
mode to call the newly added IPRT routine RTTcpSetKeepAlive() to set
SO_KEEPALIVE along with fine-tuned keep-alive options for idle timeout
(TCP_KEEPIDLE), time interval between probes (TCP_KEEPINTVL), and the
total number of probes sent before closing the connection (TCP_KEEPCNT).
This allows the TCP connection established with the TXS client in NAT
mode to be re-established when restoring a running snapshot where TXS
had been running.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/utils/TestExecServ/TestExecServiceTcp.cpp

    r99775 r100176  
    221221        if (RT_SUCCESS(rc))
    222222        {
     223            uint32_t cSecsIdle              = 75; /* idle time in seconds before first keep-alive probe */
     224            uint32_t cSecsInterval          = 30; /* interval in seconds between keep-alive probes */
     225            uint32_t cFailedPktsBeforeClose =  4; /* number of unacknowledged keep-alive probes before closing connection */
     226            rc = RTTcpSetKeepAlive(hTcpClient, true /* fEnable */, cSecsIdle, cSecsInterval, cFailedPktsBeforeClose);
     227            if (RT_FAILURE(rc))
     228                RTMsgInfo("Failed to set SO_KEEPALIVE on client socket hTcpClient: rc=%Rrc\n", rc);
    223229            hTcpClient = txsTcpSetClient(hTcpClient);
    224230            RTTcpClientCloseEx(hTcpClient, true /* fGracefulShutdown*/);
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette