monitor ThreadSocketHandler and terminate and restart if hung, convert _beginthread to CreateThread wrapper, disconnect inactive connections, ping, break up long messages to speed up initial download, better priorities for initiating connections, track how many nodes have requested our blocks and transactions, status #/offline and warning message on unsent blocks, minimize on close as separate option -- linux-test5

git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@38 1a98c847-1fd6-4fd8-948a-caf3550aa51b
This commit is contained in:
s_nakamoto
2009-11-13 01:23:08 +00:00
parent 956468c29a
commit 70e79525c9
16 changed files with 685 additions and 392 deletions

View File

@@ -54,7 +54,7 @@ static bool Send(SOCKET hSocket, const char* pszSend)
const char* pszEnd = psz + strlen(psz);
while (psz < pszEnd)
{
int ret = send(hSocket, psz, pszEnd - psz, 0);
int ret = send(hSocket, psz, pszEnd - psz, MSG_NOSIGNAL);
if (ret < 0)
return false;
psz += ret;
@@ -156,7 +156,7 @@ bool Wait(int nSeconds)
void ThreadIRCSeed(void* parg)
{
SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_NORMAL);
SetThreadPriority(THREAD_PRIORITY_NORMAL);
int nErrorWait = 10;
int nRetryWait = 10;
@@ -256,6 +256,7 @@ void ThreadIRCSeed(void* parg)
CAddress addr;
if (DecodeAddress(pszName, addr))
{
addr.nTime = GetAdjustedTime() - 51 * 60;
CAddrDB addrdb;
if (AddAddress(addrdb, addr))
printf("IRC got new address\n");