diff options
Diffstat (limited to 'Ivy')
-rw-r--r-- | Ivy/ThreadedSocket.cxx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Ivy/ThreadedSocket.cxx b/Ivy/ThreadedSocket.cxx index 10af005..be2bdf0 100644 --- a/Ivy/ThreadedSocket.cxx +++ b/Ivy/ThreadedSocket.cxx @@ -143,6 +143,13 @@ void CThreadedSocket::Close() }
}
+int CThreadedSocket::Listen(int nConnectionBacklog)
+{
+ int err = listen(m_hSocket, nConnectionBacklog);
+ if ( !err )
+ listen_mode = true;
+ return StartListener();
+}
int CThreadedSocket::Connect(const SOCKADDR* lpSockAddr, int nSockAddrLen)
{
@@ -171,7 +178,7 @@ int CThreadedSocket::Connect(const SOCKADDR* lpSockAddr, int nSockAddrLen) return err;
}
connect_pending = true;
- return 0;
+ return StartListener();
}
int CThreadedSocket::Connect(const char * lpszHostAddress, UINT nHostPort)
@@ -332,7 +339,8 @@ int CThreadedSocket::Socket(int nSocketType, int nProtocolType, int nAddressForm {
return m_hSocket;
}
- return StartListener();
+ return m_hSocket;
+ //return StartListener();
}
int CThreadedSocket::StartListener()
|