1
0

Fixed SIGPIPE on cSocket::Send().

This commit is contained in:
madmaxoft 2014-01-16 21:08:17 +01:00
parent a085319455
commit 4da8818291
3 changed files with 13 additions and 12 deletions

View File

@ -7,17 +7,6 @@
#ifdef _WIN32
#define MSG_NOSIGNAL (0)
#endif
#ifdef __MACH__
#define MSG_NOSIGNAL (0)
#endif
cBlockingTCPLink::cBlockingTCPLink(void)
{
}

View File

@ -364,7 +364,7 @@ int cSocket::Receive(char* a_Buffer, unsigned int a_Length, unsigned int a_Flags
int cSocket::Send(const char * a_Buffer, unsigned int a_Length)
{
return send(m_Socket, a_Buffer, a_Length, 0);
return send(m_Socket, a_Buffer, a_Length, MSG_NOSIGNAL);
}

View File

@ -5,6 +5,18 @@
// Windows and MacOSX don't have the MSG_NOSIGNAL flag
#if ( \
defined(_WIN32) || \
(defined(__APPLE__) && defined(__MACH__)) \
)
#define MSG_NOSIGNAL (0)
#endif
class cSocket
{
public: