History

Add Windows WSAPool declaration, associated struct and constants. It allows 100% poll compatible POSIX API on Windows.

Christian Jullien committed 7 years ago

Commit 4bb5bc41 parent 756e7661 file · +23 −0Browse files

Unified · Split

win32/include/winapi/winsock2.h+23−0
@@ -1428,6 +1428,29 @@ extern "C" { · 1427 unmodified lines
1428#define WSAGETSELECTEVENT(lParam) LOWORD(lParam)1428#define WSAGETSELECTEVENT(lParam) LOWORD(lParam)
1429#define WSAGETSELECTERROR(lParam) HIWORD(lParam)1429#define WSAGETSELECTERROR(lParam) HIWORD(lParam)
1430 1430
1431/* #if (_WIN32_WINNT >= 0x0600) */
1432#define POLLRDNORM 0x0100
1433#define POLLRDBAND 0x0200
1434#define POLLIN (POLLRDNORM | POLLRDBAND)
1435#define POLLPRI 0x0400
1436
1437#define POLLWRNORM 0x0010
1438#define POLLOUT (POLLWRNORM)
1439#define POLLWRBAND 0x0020
1440
1441#define POLLERR 0x0001
1442#define POLLHUP 0x0002
1443#define POLLNVAL 0x0004
1444
1445typedef struct pollfd {
1446 SOCKET fd;
1447 SHORT events;
1448 SHORT revents;
1449} WSAPOLLFD, *PWSAPOLLFD, FAR *LPWSAPOLLFD;
1450
1451WINSOCK_API_LINKAGE int WSAAPI WSAPoll(LPWSAPOLLFD fdArray, ULONG fds, INT timeout);
1452/* #endif // (_WIN32_WINNT >= 0x0600) */
1453
1431#ifdef __cplusplus1454#ifdef __cplusplus
1432}1455}
1433#endif1456#endif

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t