summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Ivy/ThreadedSocket.cxx11
1 files changed, 6 insertions, 5 deletions
diff --git a/Ivy/ThreadedSocket.cxx b/Ivy/ThreadedSocket.cxx
index a9a1760..d113f8e 100644
--- a/Ivy/ThreadedSocket.cxx
+++ b/Ivy/ThreadedSocket.cxx
@@ -160,7 +160,7 @@ int CThreadedSocket::Connect(const SOCKADDR* lpSockAddr, int nSockAddrLen)
ok = connect(m_hSocket, lpSockAddr, nSockAddrLen);
if ( !ok )
{
- int err = GetLastError();
+ int err = this->GetLastError();
if ( err == 0 ) return err;
TRACE( "***************************************Error connect %d\n", err);
if ( err != WSAEWOULDBLOCK )
@@ -262,7 +262,7 @@ int CThreadedSocket::SendTo(const void* lpBuf, int nBufLen, UINT nHostPort, cons
sockAddr.sin_port = htons((u_short)nHostPort);
return SendTo(lpBuf, nBufLen, (SOCKADDR*)&sockAddr, sizeof(sockAddr), nFlags);
-}
+ }
int CThreadedSocket::AddMember( const char * lpszHostAddress )
{
int multicast_ttl = 64; // region
@@ -406,7 +406,7 @@ UINT CThreadedSocket::SocketReader( )
FD_SET(m_hSocket, &exceptfds);
err = select( 1, &readfds, &writefds, &exceptfds, NULL );
- sock_err = GetLastError();
+ sock_err = this->GetLastError();
switch ( err )
{
@@ -427,6 +427,7 @@ UINT CThreadedSocket::SocketReader( )
if ( FD_ISSET(m_hSocket, &readfds) )
{
+ readcount = 0;
IOCtl( FIONREAD, &readcount );
if ( listen_mode )
OnAccept( sock_err );
@@ -491,7 +492,7 @@ UINT CThreadedSocket::SocketWriter( )
if (m_hSocket != INVALID_SOCKET)
Close();
h_writer = NULL;
- return GetLastError();
+ return this->GetLastError();
break;
}
if (m_hSocket != INVALID_SOCKET)
@@ -499,7 +500,7 @@ UINT CThreadedSocket::SocketWriter( )
FD_SET(m_hSocket, &writefds);
err = select( 1, NULL, &writefds, NULL, NULL );
- sock_err = GetLastError();
+ sock_err = this->GetLastError();
switch ( err )
{