diff options
-rw-r--r-- | Bus/Ivy/ThreadedSocket.cxx | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/Bus/Ivy/ThreadedSocket.cxx b/Bus/Ivy/ThreadedSocket.cxx index 98235af..5654758 100644 --- a/Bus/Ivy/ThreadedSocket.cxx +++ b/Bus/Ivy/ThreadedSocket.cxx @@ -71,7 +71,7 @@ void CThreadedSocket::GetSockName(ivy::string & rSocketAddress, UINT& rSocketPor /////////////////////////////////////////////////////////////////////////////
// CAscynSocket Operations
-int CThreadedSocket::Accept(CThreadedSocket& rConnectedSocket,
+SOCKET CThreadedSocket::Accept(CThreadedSocket& rConnectedSocket,
SOCKADDR* lpSockAddr, int* lpSockAddrLen)
{
ASSERT(rConnectedSocket.m_hSocket == INVALID_SOCKET);
@@ -213,32 +213,32 @@ int CThreadedSocket::Connect(const char * lpszHostAddress, UINT nHostPort) return Connect((SOCKADDR*)&sockAddr, sizeof(sockAddr));
}
-int CThreadedSocket::Receive(void* lpBuf, int nBufLen, int nFlags)
+size_t CThreadedSocket::Receive(void* lpBuf, size_t nBufLen, int nFlags)
{
- int lg = recv(m_hSocket, (LPSTR)lpBuf, nBufLen, nFlags);
+ int lg = recv(m_hSocket, (LPSTR)lpBuf, (int)nBufLen, nFlags);
return lg;
}
-int CThreadedSocket::ReceiveFrom(void* lpBuf, int nBufLen, ivy::string & rSocketAddress, UINT& rSocketPort, int nFlags)
+size_t CThreadedSocket::ReceiveFrom(void* lpBuf, size_t nBufLen, ivy::string & rSocketAddress, UINT& rSocketPort, int nFlags)
{
SOCKADDR_IN sockAddr;
memset(&sockAddr, 0, sizeof(sockAddr));
- int nSockAddrLen = sizeof(sockAddr);
- int nResult = ReceiveFrom(lpBuf, nBufLen, (SOCKADDR*)&sockAddr, &nSockAddrLen, nFlags);
+ size_t nSockAddrLen = sizeof(sockAddr);
+ size_t nResult = ReceiveFrom(lpBuf, nBufLen, (SOCKADDR*)&sockAddr, &nSockAddrLen, nFlags);
rSocketPort = ntohs(sockAddr.sin_port);
rSocketAddress = inet_ntoa(sockAddr.sin_addr);
return nResult;
}
-int CThreadedSocket::Send(const void* lpBuf, int nBufLen, int nFlags)
+size_t CThreadedSocket::Send(const void* lpBuf, size_t nBufLen, int nFlags)
{
- return send(m_hSocket, (LPSTR)lpBuf, nBufLen, nFlags);
+ return send(m_hSocket, (LPSTR)lpBuf, (int)nBufLen, nFlags);
}
-int CThreadedSocket::SendTo(const void* lpBuf, int nBufLen, UINT nHostPort, const char * lpszHostAddress, int nFlags)
+size_t CThreadedSocket::SendTo(const void* lpBuf, size_t nBufLen, UINT nHostPort, const char * lpszHostAddress, int nFlags)
{
SOCKADDR_IN sockAddr;
@@ -332,7 +332,7 @@ void CThreadedSocket::OnClose(int /*nErrorCode*/) // CThreadedSocket Implementation
-int CThreadedSocket::Socket(int nSocketType, int nProtocolType, int nAddressFormat)
+SOCKET CThreadedSocket::Socket(int nSocketType, int nProtocolType, int nAddressFormat)
{
ASSERT(m_hSocket == INVALID_SOCKET);
|