From a39ad1af4bbb8d5eaf9feed37e20994a50d67f1e Mon Sep 17 00:00:00 2001 From: Ove Kaaven Date: Mon, 27 Sep 1999 11:48:11 +0000 Subject: [PATCH] Added some basic Winsock2 definitions. --- include/winsock2.h | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 include/winsock2.h diff --git a/include/winsock2.h b/include/winsock2.h new file mode 100644 index 00000000000..c38211034d8 --- /dev/null +++ b/include/winsock2.h @@ -0,0 +1,34 @@ +/* + * Winsock 2 definitions + * + * FIXME!!!! + */ + +#ifndef __WINSOCK2API__ +#define __WINSOCK2API__ + +#include "winsock.h" + +#define FD_MAX_EVENTS 10 + +#define FD_READ_BIT 0 +#define FD_WRITE_BIT 1 +#define FD_OOB_BIT 2 +#define FD_ACCEPT_BIT 3 +#define FD_CONNECT_BIT 4 +#define FD_CLOSE_BIT 5 + +typedef struct _WSANETWORKEVENTS { + long lNetworkEvents; + int iErrorCode[FD_MAX_EVENTS]; +} WSANETWORKEVENTS, *LPWSANETWORKEVENTS; + +typedef HANDLE WSAEVENT; + +#define WSACreateEvent() CreateEvent(NULL, TRUE, FALSE, NULL) +/* etc */ + +int WINAPI WSAEnumNetworkEvents(SOCKET s, WSAEVENT hEventObject, LPWSANETWORKEVENTS lpNetworkEvents); +int WINAPI WSAEventSelect(SOCKET s, WSAEVENT hEventObject, long lNetworkEvents); + +#endif