Frage zu TCP_KEEPALIVE
-
Hallo Leute,
unter linux kann man mit der funktion sockopt alles mit dem keepalive einstellen.
TCP_KEEPALIVE: ein/ausschalten
TCP_KEEPCNT: overrides tcp_keepalive_probes
TCP_KEEPIDLE: overrides tcp_keepalive_time
TCP_KEEPINTVL: overrides tcp_keepalive_intvlunter windows kennt der die MACROS: TCP_KEEPCNT, TCP_KEEPIDLE und TCP_KEEPINTVL nicht.
Ein und ausschalten geht.
Mit der funktion WSAIoctl() kann man mit der option SIO_KEEPALIVE_VALS
/* Argument structure for SIO_KEEPALIVE_VALS */ struct tcp_keepalive { u_long onoff; u_long keepalivetime; u_long keepaliveinterval; };
die Werte für TCP_KEEPIDLE und TCP_KEEPINTVL einstellen.
Wo kann ich jetzt die letzte option TCP_KEEPCNT ändern?
MfG
-
OK hat sich erledigt
Enables keep-alive for a socket connection. Valid only for protocols that support the notion of keep-alive (connection-oriented protocols). For TCP, the default keep-alive timeout is 2 hours and the keep-alive interval is 1 second. The number of keep-alive probes cannot be changed and is set to 10.