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
This commit is contained in:
drbob 2011-07-19 10:05:14 +00:00
parent 5ff19cf9d7
commit 608cc32938
2 changed files with 3 additions and 3 deletions

View File

@ -311,9 +311,9 @@ int TcpStream::status(std::ostream &out)
out << "TcpStream::status @ (" << time(NULL) << ")" << std::endl; out << "TcpStream::status @ (" << time(NULL) << ")" << std::endl;
out << "TcpStream::state = " << (int) state << std::endl; out << "TcpStream::state = " << (int) state << std::endl;
out << 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 << " bytes Queued for transmission" << std::endl;
out << "readBuffer: " << outSizeRead << " + 1500 * "; out << "readBuffer: " << outSizeRead << " + MAX_SEG * ";
out << outQueue.size() << " + " << outSizeNet; out << outQueue.size() << " + " << outSizeNet;
out << " incoming bytes waiting" << std::endl; out << " incoming bytes waiting" << std::endl;
out << std::endl; out << std::endl;

View File

@ -38,7 +38,7 @@
#include "tcppacket.h" #include "tcppacket.h"
#include "udppeer.h" #include "udppeer.h"
#define MAX_SEG 1500 #define MAX_SEG 1000
#define TCP_MAX_SEQ UINT_MAX #define TCP_MAX_SEQ UINT_MAX
#define TCP_MAX_WIN 65500 #define TCP_MAX_WIN 65500
#define TCP_ALIVE_TIMEOUT 15 /* 15 sec ... < 20 sec UDP state limit on some firewalls */ #define TCP_ALIVE_TIMEOUT 15 /* 15 sec ... < 20 sec UDP state limit on some firewalls */