aboutsummaryrefslogtreecommitdiff
path: root/dep/CascLib/src/common/Sockets.h
diff options
context:
space:
mode:
Diffstat (limited to 'dep/CascLib/src/common/Sockets.h')
-rw-r--r--dep/CascLib/src/common/Sockets.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/dep/CascLib/src/common/Sockets.h b/dep/CascLib/src/common/Sockets.h
index c821748802b..917be387234 100644
--- a/dep/CascLib/src/common/Sockets.h
+++ b/dep/CascLib/src/common/Sockets.h
@@ -14,10 +14,6 @@
//-----------------------------------------------------------------------------
// Defines
-#ifndef INVALID_SOCKET
-#define INVALID_SOCKET (SOCKET)(-1)
-#endif
-
#ifndef SOCKET_ERROR
#define SOCKET_ERROR (-1)
#endif
@@ -57,9 +53,9 @@ class CASC_SOCKET
// Constructor and destructor
static int GetSockError();
static DWORD GetAddrInfoWrapper(const char * hostName, unsigned portNum, PADDRINFO hints, PADDRINFO * ppResult);
- static SOCKET CreateAndConnect(addrinfo * remoteItem);
- static SOCKET ReconnectAfterShutdown(SOCKET & sock, addrinfo * remoteItem);
- static PCASC_SOCKET New(addrinfo * remoteList, addrinfo * remoteItem, const char * hostName, unsigned portNum, SOCKET sock);
+ static HANDLE CreateAndConnect(PADDRINFO remoteItem);
+ static HANDLE ReconnectAfterShutdown(HANDLE & sock, PADDRINFO remoteItem);
+ static PCASC_SOCKET New(PADDRINFO remoteList, PADDRINFO remoteItem, const char * hostName, unsigned portNum, HANDLE sock);
static PCASC_SOCKET Connect(const char * hostName, unsigned portNum);
// Frees all resources and deletes the socket
@@ -76,7 +72,7 @@ class CASC_SOCKET
PADDRINFO remoteList; // List of the remote host informations
PADDRINFO remoteItem; // The particular host picked during the last connection attempt
CASC_LOCK Lock; // Lock for single threaded access
- SOCKET sock; // Opened and connected socket
+ HANDLE sock; // Opened and connected socket
DWORD dwRefCount; // Number of references
DWORD portNum; // Port number
char hostName[1]; // Buffer for storing remote host (variable length)