tcp_typed

Crates.iotcp_typed
lib.rstcp_typed
version0.1.4
sourcesrc
created_at2018-08-03 13:17:14.393668
updated_at2019-08-22 20:49:06.476866
descriptionA wrapper around platform TCP socket APIs that leverages the type system to ensure correct usage. It's quite easy to accidentally misuse the Berkeley sockets or similar APIs, resulting in ECONNRESET/EPIPE/etc, data being lost on close, and potential hangs from non-exhaustive collection of edge-triggered events. This library aims to make it impossible to misuse in non-unsafe code.
homepagehttps://github.com/alecmocatta/tcp_typed
repositoryhttps://github.com/alecmocatta/tcp_typed
max_upload_size
id77337
size71,730
Alec Mocatta (alecmocatta)

documentation

https://docs.rs/tcp_typed/0.1.4

README

tcp_typed

Crates.io MIT / Apache 2.0 licensed Build Status

Docs

A wrapper around platform TCP socket APIs that leverages the type system to ensure correct usage.

It's quite easy to accidentally misuse the Berkeley sockets or similar APIs, resulting in ECONNRESET/EPIPE/etc, data being lost on close, and potential hangs from non-exhaustive collection of events given edge-triggered notifications.

This library aims to make it impossible to misuse in non-unsafe code.

If you ever see a connection reset / ECONNRESET, EPIPE, data being lost on close, or panic, then it is a bug in this library! Please file an issue with as much info as possible.

It's designed to be used in conjunction with an implementer of the Notifier trait – for example notifier. As long as the Notifier contract is fulfilled, then this library will collect all relevent events (connected, data in, data available to be written, remote closed, bytes acked, connection errors) upon each edge-triggered notification.

Note

Currently doesn't support Windows.

License

Licensed under either of

at your option.

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Commit count: 33

cargo fmt