aboutsummaryrefslogtreecommitdiff
path: root/core/sys
diff options
context:
space:
mode:
authorJon Lipstate <Jon@Lipstate.com>2023-03-28 22:17:39 -0700
committerJon Lipstate <Jon@Lipstate.com>2023-03-28 22:17:39 -0700
commit24493e89ad581e6e095179bf89b0c01fdd3e415c (patch)
tree9e26e31c2803f67e9d1644c1a8f2d3c8b2c9cb7e /core/sys
parentab7e1e01de2d62173b520535d7d87c48eec3f6a6 (diff)
WSAPoll
Diffstat (limited to 'core/sys')
-rw-r--r--core/sys/windows/ws2_32.odin11
1 files changed, 11 insertions, 0 deletions
diff --git a/core/sys/windows/ws2_32.odin b/core/sys/windows/ws2_32.odin
index 30515d430..4b70e880a 100644
--- a/core/sys/windows/ws2_32.odin
+++ b/core/sys/windows/ws2_32.odin
@@ -3,11 +3,22 @@ package sys_windows
foreign import ws2_32 "system:Ws2_32.lib"
+POLLRDNORM :: 0x0100
+POLLRDBAND :: 0x0200
+POLLIN :: (POLLRDNORM | POLLRDBAND)
+POLLPRI :: 0x0400
+WSA_POLLFD::struct{
+ fd:SOCKET,
+ events:c_short,
+ revents:c_short,
+}
+
@(default_calling_convention="stdcall")
foreign ws2_32 {
WSAStartup :: proc(wVersionRequested: WORD, lpWSAData: LPWSADATA) -> c_int ---
WSACleanup :: proc() -> c_int ---
WSAGetLastError :: proc() -> c_int ---
+ WSAPoll :: proc(fdArray: ^WSA_POLLFD, fds: c_ulong, timeout: c_int) -> c_int ---
WSADuplicateSocketW :: proc(
s: SOCKET,
dwProcessId: DWORD,