From 9799d1dd30ad81006670dd115f294122789610f9 Mon Sep 17 00:00:00 2001 From: fcolin Date: Thu, 1 Feb 2007 13:05:32 +0000 Subject: Utilisateur : Fcolin Date : 23/09/05 Heure : 15:27 Archivé dans $/Bus/Ivy Commentaire: (vss 23) --- Bus/Ivy/ThreadedSocket.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'Bus/Ivy') 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); -- cgit v1.1