From 608cc3293847c0e30a1a67e79f2d42ea52717f77 Mon Sep 17 00:00:00 2001 From: drbob Date: Tue, 19 Jul 2011 10:05:14 +0000 Subject: [PATCH] Reduce MAX_SEG to 1000 bytes. Previously it was at 1500 + HEADER, which could have been larger than MTU git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4473 b45a01b8-16f6-495d-af2f-9b41ad6348cc --- libretroshare/src/tcponudp/tcpstream.cc | 4 ++-- libretroshare/src/tcponudp/tcpstream.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libretroshare/src/tcponudp/tcpstream.cc b/libretroshare/src/tcponudp/tcpstream.cc index aed7a5f1a..eb862aa13 100644 --- a/libretroshare/src/tcponudp/tcpstream.cc +++ b/libretroshare/src/tcponudp/tcpstream.cc @@ -311,9 +311,9 @@ int TcpStream::status(std::ostream &out) out << "TcpStream::status @ (" << time(NULL) << ")" << std::endl; out << "TcpStream::state = " << (int) state << std::endl; out << std::endl; - out << "writeBuffer: " << inSize << " + 1500 * " << inQueue.size(); + out << "writeBuffer: " << inSize << " + MAX_SEG * " << inQueue.size(); out << " bytes Queued for transmission" << std::endl; - out << "readBuffer: " << outSizeRead << " + 1500 * "; + out << "readBuffer: " << outSizeRead << " + MAX_SEG * "; out << outQueue.size() << " + " << outSizeNet; out << " incoming bytes waiting" << std::endl; out << std::endl; diff --git a/libretroshare/src/tcponudp/tcpstream.h b/libretroshare/src/tcponudp/tcpstream.h index 29c627554..8d832f199 100644 --- a/libretroshare/src/tcponudp/tcpstream.h +++ b/libretroshare/src/tcponudp/tcpstream.h @@ -38,7 +38,7 @@ #include "tcppacket.h" #include "udppeer.h" -#define MAX_SEG 1500 +#define MAX_SEG 1000 #define TCP_MAX_SEQ UINT_MAX #define TCP_MAX_WIN 65500 #define TCP_ALIVE_TIMEOUT 15 /* 15 sec ... < 20 sec UDP state limit on some firewalls */