2014-03-10 14:04:58 +08:00
|
|
|
#ifndef WSOCKET_H
|
|
|
|
#define WSOCKET_H
|
|
|
|
/*=========================================================================*\
|
|
|
|
* Socket compatibilization module for Win32
|
|
|
|
* LuaSocket toolkit
|
|
|
|
\*=========================================================================*/
|
|
|
|
|
|
|
|
/*=========================================================================*\
|
|
|
|
* WinSock include files
|
|
|
|
\*=========================================================================*/
|
|
|
|
#include <winsock2.h>
|
|
|
|
#include <ws2tcpip.h>
|
|
|
|
|
|
|
|
typedef int socklen_t;
|
|
|
|
typedef SOCKADDR_STORAGE t_sockaddr_storage;
|
|
|
|
typedef SOCKET t_socket;
|
|
|
|
typedef t_socket *p_socket;
|
|
|
|
|
2014-03-20 17:04:54 +08:00
|
|
|
#ifndef IPV6_V6ONLY
|
|
|
|
#define IPV6_V6ONLY 27
|
|
|
|
#endif
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
#define SOCKET_INVALID (INVALID_SOCKET)
|
|
|
|
|
|
|
|
#ifndef SO_REUSEPORT
|
|
|
|
#define SO_REUSEPORT SO_REUSEADDR
|
|
|
|
#endif
|
|
|
|
|
2014-03-20 17:04:54 +08:00
|
|
|
#ifndef AI_NUMERICSERV
|
|
|
|
#define AI_NUMERICSERV (0)
|
|
|
|
#endif
|
|
|
|
|
2014-03-10 14:04:58 +08:00
|
|
|
#endif /* WSOCKET_H */
|