summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Bus/Ivy/ThreadedSocket.cxx12
1 files changed, 10 insertions, 2 deletions
diff --git a/Bus/Ivy/ThreadedSocket.cxx b/Bus/Ivy/ThreadedSocket.cxx
index 10af005..be2bdf0 100644
--- a/Bus/Ivy/ThreadedSocket.cxx
+++ b/Bus/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()