roa-tcp

Crates.ioroa-tcp
lib.rsroa-tcp
version0.5.0-rc
sourcesrc
created_at2020-03-03 14:43:54.312736
updated_at2020-03-20 13:45:35.130143
descriptiontcp based acceptor for roa
homepagehttps://github.com/Hexilee/roa/wiki
repositoryhttps://github.com/Hexilee/roa
max_upload_size
id214932
size14,424
xixi (Hexilee)

documentation

https://docs.rs/roa-tcp

README

Stable Test codecov Rust Docs Crate version Download Version License: MIT

Roa-tcp

This crate provides an acceptor implementing roa_core::Accept and an app extension.

TcpIncoming

use roa_core::App;
use roa_tcp::TcpIncoming;
use std::io;

# fn main() -> io::Result<()> {
let app = App::new(());
let incoming = TcpIncoming::bind("127.0.0.1:0")?;
let server = app.accept(incoming);
// server.await
Ok(())
# }

Listener

use roa_core::App;
use roa_tcp::Listener;
use std::io;

# fn main() -> io::Result<()> {
let app = App::new(());
let (addr, server) = app.listen_on("127.0.0.1:0")?;
// server.await
Ok(())
# }
Commit count: 722

cargo fmt