attempt to fix crash of irc client on exit

This commit is contained in:
Mark Vejvoda
2013-05-15 00:45:34 +00:00
parent 280a00dc35
commit dbd26de28f
4 changed files with 142 additions and 23 deletions

View File

@@ -50,6 +50,20 @@ using namespace Shared::PlatformCommon;
namespace Shared { namespace Platform {
#ifdef WIN32
#define PLATFORM_SOCKET_TRY_AGAIN WSAEWOULDBLOCK
#define PLATFORM_SOCKET_INPROGRESS WSAEINPROGRESS
#define PLATFORM_SOCKET_INTERRUPTED WSAEWOULDBLOCK
#else
#define PLATFORM_SOCKET_TRY_AGAIN EAGAIN
#define PLATFORM_SOCKET_INPROGRESS EINPROGRESS
#define PLATFORM_SOCKET_INTERRUPTED EINTR
#endif
// The callback Interface used by the UPNP discovery process
class FTPClientValidationInterface {
public:
@@ -137,6 +151,10 @@ public:
Socket();
virtual ~Socket();
static int getLastSocketError();
static const char * getLastSocketErrorText(int *errNumber=NULL);
static string getLastSocketErrorFormattedText(int *errNumber=NULL);
static bool disableNagle;
static int DEFAULT_SOCKET_SENDBUF_SIZE;
static int DEFAULT_SOCKET_RECVBUF_SIZE;