timeout_io 0.3.0

This library provides a simple timeout-based API for IO-operations
Documentation

License License Travis CI AppVeyor CI

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 (uses libselect)
  • TCP-read/read-until/write (uses libselect)
  • StdIOE-read/read-write/write (uses libselect)
  • UDP-receive/send (uses libselect)

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 😇)

Dependencies

My etrace crate for error handling and tiny_future which is used during name resolution (which needs to be done in a separate thread due to OS-API limitations).

Build Library and Documentation

To build the documentation, go into the projects root-directory and run cargo doc --release; to open the documentation in your web-browser, run cargo doc --open.

To build the library, go into the projects root-directory and run cargo build --release; you can find the build in target/release.