--- deliantra/server/socket/lowlevel.C 2007/06/09 22:54:28 1.44 +++ deliantra/server/socket/lowlevel.C 2007/06/10 04:44:21 1.46 @@ -21,25 +21,13 @@ * The authors can be reached via e-mail to */ -/** - * \file - * Low-level socket-related functions. - * - * \date 2003-12-02 - * - * Contains some base functions that both the client and server - * can use. As such, depending what we are being compiled for will - * determine what we can include. the client is designed have - * CFCLIENT defined as part of its compile flags. - */ - using namespace std; #include #include #include -#ifdef __linux__ +#if HAVE_TCP_INFO # include # include # include @@ -59,7 +47,7 @@ if (destroyed ()) return; -#ifdef __linux__ //TODO: this is available on bsds, too, use a configure test. +#if HAVE_TCP_INFO // check about once per second, spread evenly over all clients if (!((pticks + fd) & 7)) { @@ -69,6 +57,9 @@ if (!getsockopt (fd, IPPROTO_TCP, TCP_INFO, &tcpi, &len) && len == sizeof (tcpi)) { + if (tcpi.tcpi_snd_mss) + mss = tcpi.tcpi_snd_mss; + rtt = tcpi.tcpi_rtt; rttvar = tcpi.tcpi_rttvar;