X-Git-Url: https://git.novaco.in/?a=blobdiff_plain;f=src%2Firc.cpp;h=7a6f40cfad4f80ca5a7eec1de2dc0d6839fbdd3c;hb=a3342d096f3456e5e8d087bb3c8eea8b25eb6b57;hp=e79577269eb95d62ffdd78ffdbe311aadd1344f9;hpb=e0b8d459b189ee2b7e95a47b217e4b02bfb523b3;p=novacoin.git diff --git a/src/irc.cpp b/src/irc.cpp index e795772..7a6f40c 100644 --- a/src/irc.cpp +++ b/src/irc.cpp @@ -76,57 +76,6 @@ static bool Send(SOCKET hSocket, const char* pszSend) return true; } -bool RecvLine(SOCKET hSocket, string& strLine) -{ - strLine = ""; - loop - { - char c; - int nBytes = recv(hSocket, &c, 1, 0); - if (nBytes > 0) - { - if (c == '\n') - continue; - if (c == '\r') - return true; - strLine += c; - if (strLine.size() >= 9000) - return true; - } - else if (nBytes <= 0) - { - if (fShutdown) - return false; - if (nBytes < 0) - { - int nErr = WSAGetLastError(); - if (nErr == WSAEMSGSIZE) - continue; - if (nErr == WSAEWOULDBLOCK || nErr == WSAEINTR || nErr == WSAEINPROGRESS) - { - Sleep(10); - continue; - } - } - if (!strLine.empty()) - return true; - if (nBytes == 0) - { - // socket closed - printf("IRC socket closed\n"); - return false; - } - else - { - // socket error - int nErr = WSAGetLastError(); - printf("IRC recv failed: %d\n", nErr); - return false; - } - } - } -} - bool RecvLineIRC(SOCKET hSocket, string& strLine) { loop