Expose tokio_uds from the root crate (#526)

This commit is contained in:
Martin Chaine 2018-08-16 06:26:10 +02:00 committed by Carl Lerche
parent 6b84c73f12
commit 2b1b0ac858
3 changed files with 19 additions and 0 deletions

View File

@ -58,6 +58,9 @@ futures = "0.1.20"
# Needed until `reactor` is removed from `tokio`.
mio = "0.6.14"
[target.'cfg(unix)'.dependencies]
tokio-uds = { version = "0.2.0", path = "tokio-uds" }
[dev-dependencies]
bytes = "0.4"
env_logger = { version = "0.5", default-features = false }

View File

@ -81,6 +81,9 @@ extern crate tokio_timer;
extern crate tokio_tcp;
extern crate tokio_udp;
#[cfg(unix)]
extern crate tokio_uds;
pub mod clock;
pub mod executor;
pub mod fs;

View File

@ -39,3 +39,16 @@
pub use tokio_tcp::{TcpStream, ConnectFuture};
pub use tokio_tcp::{TcpListener, Incoming};
pub use tokio_udp::{UdpSocket, UdpFramed, SendDgram, RecvDgram};
#[cfg(unix)]
pub mod unix {
//! Unix domain socket bindings for `tokio`.
pub use tokio_uds::{
ConnectFuture, Incoming, RecvDgram, SendDgram, UCred, UnixDatagram, UnixListener,
UnixStream,
};
}
#[cfg(unix)]
pub use self::unix::{UnixListener, UnixStream};