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.
§Installation
Ensure your Cargo.toml contains:
[dependencies]
utp = "*"Structs§
- Buffered
UtpStream - A buffered
UtpStreamto avoid making too many system calls when sending small amounts of data through utp - UtpSocket
- A reference to an existing
UtpSocketthat can be shared amongst multiple tasks. This can’t function unless the correspondingUtpSocketDriveris scheduled to run on the same runtime. - UtpStream
- A
UtpStreamthat can be used to read and write in a more convenient fashion with theAsyncReadandAsyncWritetraits. - UtpStream
Driver - This is a
Futurethat takes care of handling all events related to aUtpStream.UtpStreamwon’t receive neither send any data until this driver is spawned as a tokio task.