Skip to content

Commit

Permalink
Use SIO_* constants defined in windows-sys
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomasdezeeuw committed Apr 28, 2022
1 parent 229230c commit e9e4571
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions src/sys/windows/selector.rs
Original file line number Diff line number Diff line change
Expand Up @@ -536,15 +536,11 @@ cfg_io_source! {
use std::mem::size_of;
use std::ptr::null_mut;

use windows_sys::Win32::Networking::WinSock::{WSAGetLastError, SOCKET_ERROR, WSAIoctl, IOC_OUT, IOC_WS2};

// These constants were part of winapi but are not yet in windows-sys
//
// https://github.com/microsoft/win32metadata/issues/844
const SIO_BSP_HANDLE: u32 = IOC_OUT | IOC_WS2 | 27; // 1_207_959_579u32
const SIO_BSP_HANDLE_SELECT: u32 = IOC_OUT | IOC_WS2 | 28; // 1_207_959_580u32
const SIO_BSP_HANDLE_POLL: u32 = IOC_OUT | IOC_WS2 | 29; // 1_207_959_581u32
const SIO_BASE_HANDLE: u32 = IOC_OUT | IOC_WS2 | 34; // 1_207_959_586u32
use windows_sys::Win32::Networking::WinSock::{
WSAGetLastError, WSAIoctl, SIO_BASE_HANDLE, SIO_BSP_HANDLE,
SIO_BSP_HANDLE_POLL, SIO_BSP_HANDLE_SELECT, SOCKET_ERROR,
};


impl SelectorInner {
fn register(
Expand Down

0 comments on commit e9e4571

Please sign in to comment.