Crate utp[][src]

Expand description

Implementation of the Micro Transport Protocol.

This library provides both a socket interface (UtpSocket) and a stream interface (UtpStream). I recommend that you use UtpStream, as it implements the Read and Write traits we all know (and love) from std::io, which makes it generally easier to work with than UtpSocket.


Ensure your Cargo.toml contains:

utp = "*"



A buffered UtpStream to avoid making too many system calls when sending small amounts of data through utp


A reference to an existing UtpSocket that can be shared amongst multiple tasks. This can’t function unless the corresponding UtpSocketDriver is scheduled to run on the same runtime.


A UtpStream that can be used to read and write in a more convenient fashion with the AsyncRead and AsyncWrite traits.


This is a Future that takes care of handling all events related to a UtpStream. UtpStream won’t receive neither send any data until this driver is spawned as a tokio task.