1 unstable release
Uses old Rust 2015
0.1.2 | Nov 11, 2021 |
---|---|
0.1.1 |
|
0.1.0 |
|
#17 in #select
5KB
85 lines
select-rs
A POSIX select I/O Multiplexing Rust library.
Get started
# Cargo.toml
[dependencies]
select-rs = "0.1.0"
Example
use select_rs::*;
fn main(){
let mut fds : FdSet = unsafe {std::mem::zeroed()};
FD_ZERO(&mut fds);
FD_SET(0 , &mut fds);
assert!(select(1, std::ptr::null_mut() , &mut fds ,std::ptr::null_mut()) > 0);
assert!(FD_ISSET(0, &mut fds));
}
Dependencies
~220KB