tokio-quicker
Async QUIC Listener/Socket for tokio using quiche.
Roadmap
- QuicListener for server use.
- QuicSocket for client use.
- Boringssl key generation (Can be disabled by disabling the default features).
- Swappable backend (quiche/quinn) for boringssl and openssl support.
Examples
Client
First create a QuicSocket
.
let mut connection = bind
.await?
.connect
.await?;
Then you can start opening new QuicStream
s or receive incoming ones from the server.
let mut stream = connection.bidi.await?;
let mut stream = connection.incoming.await?;
These implement the tokio AsyncRead
and AsyncWrite
traits.
Server
Again create a QuicListener
.
let mut listener = bind.await?;
Then you can use a while loop to accept incoming connection and either handle them directly on the thread or move them to a new one.
while let Ok = listener.accept.await