… | |
… | |
55 | struct tcp_info tcpi; |
55 | struct tcp_info tcpi; |
56 | socklen_t len = sizeof (tcpi); |
56 | socklen_t len = sizeof (tcpi); |
57 | |
57 | |
58 | if (!getsockopt (fd, IPPROTO_TCP, TCP_INFO, &tcpi, &len) && len == sizeof (tcpi)) |
58 | if (!getsockopt (fd, IPPROTO_TCP, TCP_INFO, &tcpi, &len) && len == sizeof (tcpi)) |
59 | { |
59 | { |
|
|
60 | if (tcpi.tcpi_snd_mss) |
|
|
61 | mss = tcpi.tcpi_snd_mss; |
|
|
62 | |
60 | rtt = tcpi.tcpi_rtt; |
63 | rtt = tcpi.tcpi_rtt; |
61 | rttvar = tcpi.tcpi_rttvar; |
64 | rttvar = tcpi.tcpi_rttvar; |
62 | |
65 | |
63 | if (tcpi.tcpi_last_ack_recv > int (SOCKET_TIMEOUT * 1000)) |
66 | if (tcpi.tcpi_last_ack_recv > int (SOCKET_TIMEOUT * 1000)) |
64 | { |
67 | { |