Registry / networking / tk-listen

tk-listen

JSON →
library0.2.1rscratesunverified

Helper futures for listening on TCP or Unix sockets with resource limits and error handling.

# Cargo.toml [dependencies] tk-listen = "0.2.1"
INSTALL
IMPORT
SIG · TK-LISTEN
T
tk-listen
networkingrustv0.2.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

ListenExt
use tk_listen::ListenExt;

Listen with error logging and backpressure.

use tk_listen::ListenExt; use tokio::net::TcpListener; #[tokio::main] async fn main() { let listener = TcpListener::bind("127.0.0.1:8080").await.unwrap(); let mut incoming = listener.incoming().log_errors().backpressure(100); while let Some(stream) = incoming.next().await { // handle connection } }
Debug
Known issues
gotchaRequires Tokio runtime
fix
Add tokio as a dependency and use #[tokio::main] or similar runtime.
affects: >=0.2.0
Upgrade
Version history
0.2.1latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
41 hits · last 30 days
node
38
Resources
tk-listen — cargo add tk-listen · libregistry