tokio-tls-listener

Crates.iotokio-tls-listener
lib.rstokio-tls-listener
version0.2.0
sourcesrc
created_at2023-06-01 20:55:29.299182
updated_at2024-06-04 19:31:32.076836
descriptionThin wrapper around `tokio-rustls` to make it a little easier to use
homepage
repositoryhttps://github.com/nurmohammed840/tokio-tls-listener
max_upload_size
id880179
size6,736
Nur (nurmohammed840)

documentation

README

A thin wrapper around tokio-rustls to make it a little bit easier to use.

Example

use tokio_tls_listener::{TlsListener, tls_config};
async {
    let conf = tls_config("./cert.pem", "./key.pem").unwrap();
    let listener = TlsListener::bind("127.0.0.1:4433", conf).await.unwrap();
    loop {
        let Ok((stream, addr)) = listener.accept_tls().await else { continue };
        // ...
    }
};
Commit count: 8

cargo fmt