- stupid win32 compile fix for sockets

This commit is contained in:
Mark Vejvoda
2010-08-07 06:28:00 +00:00
parent 0f8eb267c6
commit 2dcbe1473b

View File

@@ -33,6 +33,8 @@
#include <iphlpapi.h> #include <iphlpapi.h>
#include <strstream> #include <strstream>
#define MSG_NOSIGNAL 0
#else #else
#include <unistd.h> #include <unistd.h>
@@ -981,7 +983,8 @@ int Socket::send(const void *data, int dataSize) {
MutexSafeWrapper safeMutex(&dataSynchAccessor); MutexSafeWrapper safeMutex(&dataSynchAccessor);
//SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); //SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
bytesSent = ::send(sock, data, dataSize, MSG_NOSIGNAL);
bytesSent = ::send(sock, (const char *)data, dataSize, MSG_NOSIGNAL);
//SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__); //SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
} }
@@ -1008,7 +1011,7 @@ int Socket::send(const void *data, int dataSize) {
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] attemptCount = %d, sock = %d, dataSize = %d, data = %p\n",__FILE__,__FUNCTION__,__LINE__,attemptCount,sock,dataSize,data); SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] attemptCount = %d, sock = %d, dataSize = %d, data = %p\n",__FILE__,__FUNCTION__,__LINE__,attemptCount,sock,dataSize,data);
MutexSafeWrapper safeMutex(&dataSynchAccessor); MutexSafeWrapper safeMutex(&dataSynchAccessor);
bytesSent = ::send(sock, data, dataSize, MSG_NOSIGNAL); bytesSent = ::send(sock, (const char *)data, dataSize, MSG_NOSIGNAL);
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] #2 EAGAIN during send, trying again returned: %d\n",__FILE__,__FUNCTION__,bytesSent); SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s] #2 EAGAIN during send, trying again returned: %d\n",__FILE__,__FUNCTION__,bytesSent);
} }