Got DCC Send and Recieve working (without having to use threads)

This commit is contained in:
Brendan Walker
2002-12-19 23:59:12 +00:00
parent f512af6daf
commit fa3572a33e
16 changed files with 996 additions and 1445 deletions
+10 -1
View File
@@ -106,7 +106,16 @@ bool Socket::Listen()
Socket Socket::Accept()
{
return Socket(SDLNet_TCP_Accept(m_sock));
const int kMaxRetry = 10;
TCPsocket new_sock;
for (int i = 0; i < kMaxRetry; i++)
{
new_sock = SDLNet_TCP_Accept(m_sock);
if ( new_sock ) break;
}
return Socket(new_sock);
}
int Socket::Send(const unsigned char* buf, int cbBuf)