Expand description
§About
This library provides a simple timeout-based API for IO-operations.
It provides the following features:
- DNS-resolution (currently uses a background-thread)
- TCP-accept
- TCP-read/read-until/write
- StdIOE-read/read-until/write
- UDP-receive/send
All functions are defined as traits, so that you can easily wrap your own IO-channels without breaking compatibility.
Note: We currently do not provide a function for timeout-based connect
-calls; use
std::net::TcpStream::connect_timeout
for TCP-connections or build sth. using io::libselect
(and feel free to commit if you do so 😇)
Structs§
- Event
Mask - A struct describing null or more IO-events
- Select
Set - A set of multiple
(handle: event)
-pairs that allows you to callselect
on all pairs at the same time
Enums§
- Timeout
IoError - An IO-error-wrapper
Traits§
- Acceptor
- A trait for accepting elements, e.g. a TCP-listener
- DnsResolvable
- A trait for elements which contain a DNS-resolvable address
- Instant
Ext - Extends
std::time::Instant
- IpParseable
- A trait for elements which can be parsed to an IP-address
- RawFd
- A wrapper-trait that unifies the
std::os::unix::io::AsRawFd
andstd::os::windows::io::AsRawSocket
traits - Reader
- A trait for reading with timeouts
- Wait
ForEvent - This trait defines an API to wait for an event
- Writer
- A trait for writing with timeouts