diff options
author | fcolin | 2007-02-01 13:05:32 +0000 |
---|---|---|
committer | fcolin | 2007-02-01 13:05:32 +0000 |
commit | 9799d1dd30ad81006670dd115f294122789610f9 (patch) | |
tree | e2b7d1f01beb7522cd146125755e25905fe6cab9 /Bus | |
parent | 203554f06e707169a987d34e18422589a5c14b90 (diff) | |
download | ivy-cplusplus-9799d1dd30ad81006670dd115f294122789610f9.zip ivy-cplusplus-9799d1dd30ad81006670dd115f294122789610f9.tar.gz ivy-cplusplus-9799d1dd30ad81006670dd115f294122789610f9.tar.bz2 ivy-cplusplus-9799d1dd30ad81006670dd115f294122789610f9.tar.xz |
Utilisateur : Fcolin Date : 23/09/05 Heure : 15:27 Archivé dans $/Bus/Ivy Commentaire: (vss 23)
Diffstat (limited to 'Bus')
-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);
|