#async #tcp #unix #sockets


Unified types for asynchronous TCP & Unix sockets

3 unstable releases

0.2.0 May 23, 2020
0.1.1 May 9, 2020
0.1.0 May 9, 2020

32 downloads per month
Used in 2 crates

MIT license

345 lines

Unified types for asynchronous TCP & Unix sockets.

The types provided by this crate allow for writing socket-type-agnostic network applications that treat UNIX sockets in the same way as IPv4 and IPv6.

This package is built using async-std and is inspired by the multisock crate.


use async_std::prelude::*;
use async_uninet::{Listener, SocketAddr};

let address = SocketAddr::from_str("unix:/tmp/sock").await.unwrap(); // use unix socket
let address = SocketAddr::from_str("").await.unwrap(); // use tcp address
let listener = Listener::bind(&address).await.unwrap();

while let Some(stream) = listener.incoming().next().await {


~65K SLoC