Browse Source

Merge pull request #1545 from TheBlueMatt/diffsendbuffer

Minor send buffer changes
0.8
Jeff Garzik 13 years ago
parent
commit
da1103f4f8
  1. 2
      src/init.cpp
  2. 2
      src/net.cpp
  3. 2
      src/net.h

2
src/init.cpp

@ -239,7 +239,7 @@ std::string HelpMessage()
" -banscore=<n> " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n" + " -banscore=<n> " + _("Threshold for disconnecting misbehaving peers (default: 100)") + "\n" +
" -bantime=<n> " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n" + " -bantime=<n> " + _("Number of seconds to keep misbehaving peers from reconnecting (default: 86400)") + "\n" +
" -maxreceivebuffer=<n> " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n" + " -maxreceivebuffer=<n> " + _("Maximum per-connection receive buffer, <n>*1000 bytes (default: 5000)") + "\n" +
" -maxsendbuffer=<n> " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 5000)") + "\n" + " -maxsendbuffer=<n> " + _("Maximum per-connection send buffer, <n>*1000 bytes (default: 1000)") + "\n" +
#ifdef USE_UPNP #ifdef USE_UPNP
#if USE_UPNP #if USE_UPNP
" -upnp " + _("Use UPnP to map the listening port (default: 1 when listening)") + "\n" + " -upnp " + _("Use UPnP to map the listening port (default: 1 when listening)") + "\n" +

2
src/net.cpp

@ -938,8 +938,6 @@ void ThreadSocketHandler2(void* parg)
pnode->CloseSocketDisconnect(); pnode->CloseSocketDisconnect();
} }
} }
if (vSend.size() > SendBufferSize())
printf("socket send buffer full warning (%d bytes)\n", vSend.size());
} }
} }
} }

2
src/net.h

@ -27,7 +27,7 @@ extern int nBestHeight;
inline unsigned int ReceiveBufferSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); } inline unsigned int ReceiveBufferSize() { return 1000*GetArg("-maxreceivebuffer", 5*1000); }
inline unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 5*1000); } inline unsigned int SendBufferSize() { return 1000*GetArg("-maxsendbuffer", 1*1000); }
void AddOneShot(std::string strDest); void AddOneShot(std::string strDest);
bool RecvLine(SOCKET hSocket, std::string& strLine); bool RecvLine(SOCKET hSocket, std::string& strLine);

Loading…
Cancel
Save