#![allow(dead_code)]
#[macro_use] extern crate bitflags;
#[macro_use] extern crate lazy_static;
extern crate kernel32;
extern crate winapi;
extern crate libc;
extern crate ws2_32;
extern crate errno;
#[cfg(feature = "context")] extern crate context;
#[cfg(feature = "termios")] extern crate termios;
#[cfg(feature = "openssl")] extern crate openssl;
#[cfg(feature = "openssl-sys")] extern crate openssl_sys;
#[cfg(feature = "test")] extern crate test;
macro_rules! libc_try {
($expr:expr) => (
match unsafe { $expr } {
rc if rc >= 0 => rc,
_ => return Err(::std::io::Error::last_os_error()),
})
}
macro_rules! libc_unwrap {
($expr:expr) => (
match unsafe { $expr } {
rc if rc >= 0 => rc,
_ => panic!("{}", ::std::io::Error::last_os_error()),
}
)
}
#[cfg(debug_assertions)]
macro_rules! libc_ign {
($expr:expr) => (
if unsafe { $expr } < 0 {
panic!("{}", ::std::io::Error::last_os_error());
}
)
}
#[cfg(not(debug_assertions))]
macro_rules! libc_ign {
($expr:expr) => (
let _ = unsafe { $expr };
)
}
mod unsafe_cell;
mod prelude;
pub use self::prelude::*;
mod ffi;
pub use self::ffi::{RawFd, AsRawFd};
mod error;
pub mod socket_base;
mod buffers;
pub use self::buffers::StreamBuf;
mod core;
pub use self::core::{IoContext, AsIoContext, IoContextWork, Socket};
mod async;
pub use self::async::{Handler, Strand, StrandImmutable, wrap};
#[cfg(feature = "context")] pub use self::async::Coroutine;
mod reactive_io;
mod streams;
pub use self::streams::{Stream, MatchCondition,
};
mod stream_socket;
pub use self::stream_socket::StreamSocket;
mod dgram_socket;
pub use self::dgram_socket::DgramSocket;
mod raw_socket;
pub use self::raw_socket::RawSocket;
mod seq_packet_socket;
pub use self::seq_packet_socket::SeqPacketSocket;
mod socket_listener;
pub use self::socket_listener::SocketListener;
pub mod ip;
mod from_str;
#[cfg(unix)] pub mod local;
#[cfg(unix)] pub mod posix;
pub mod generic;
#[cfg(feature = "termios")] pub mod serial_port;
#[cfg(target_os = "linux")] mod signal_set;
#[cfg(target_os = "linux")] pub use self::signal_set::{Signal, SignalSet, raise};
pub mod clock;
mod waitable_timer;
pub use self::waitable_timer::{WaitableTimer, SteadyTimer, SystemTimer};