Kaydet (Commit) b1932b7a authored tarafından Tor Lillqvist's avatar Tor Lillqvist

send()/recv() on sockets (instead of write()/read()) for Windows portability

Change-Id: Ifaa890d87021c7786c7392f52d4f29b0779a7668
üst c439fad7
......@@ -52,7 +52,7 @@ sal_Int32 BufferedStreamSocket::write( const void* pBuffer, sal_uInt32 n )
if ( !usingCSocket )
return StreamSocket::write( pBuffer, n );
else
return ::write( mSocket, pBuffer, (size_t) n );
return ::send( mSocket, pBuffer, (size_t) n, 0 );
}
sal_Int32 BufferedStreamSocket::readLine( OString& aLine )
......@@ -79,7 +79,7 @@ sal_Int32 BufferedStreamSocket::readLine( OString& aLine )
if ( !usingCSocket)
aRet = StreamSocket::recv( &aBuffer[aRead], 100 );
else
aRet = ::read( mSocket, &aBuffer[aRead], 100 );
aRet = ::recv( mSocket, &aBuffer[aRead], 100, 0 );
if ( aRet == 0 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment