select-rs

Crates.ioselect-rs
lib.rsselect-rs
version0.1.2
sourcesrc
created_at2021-11-10 09:35:11.970158
updated_at2021-11-11 07:10:53.549592
descriptionA POSIX select I/O Multiplexing Rust library.
homepagehttps://crates.io/crates/select-rs
repositoryhttps://github.com/b23r0/select-rs
max_upload_size
id479570
size5,933
b23r0 (b23r0)

documentation

https://docs.rs/crate/select-rs/0.1.0

README

select-rs Build Status ChatOnDiscord Crate

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));
}
Commit count: 10

cargo fmt