4 releases (breaking)

Uses old Rust 2015

0.4.0 Dec 4, 2018
0.3.0 Nov 12, 2018
0.2.0 Oct 8, 2018
0.1.0 Oct 8, 2018

#27 in #wrapped


Used in p2p

MIT OR BSD-3-Clause

90KB
2K SLoC

Socket collection

Crate Documentation Linux/OS X/Windows
Documentation Build Status

The goal of this crate is to provide a collection of async sockets which can be used out of the box with mio event loop. As a simple example, using stream based protocols will require some sort of mechanism to determine the boundaries of a message etc., and this crate provides default implementation to handle those and abstract the boilerplate from the user libs. In addition, socket-collection supports optional encryption based on safe_crypto crate.


lib.rs:

Overview

The goal of this crate is to provide a collection of async sockets which can be used out of the box with mio event loop. Currently the crate exposes UDP and TCP sockets: UdpSock and TcpSock respectively. The socket behavior is very specific for p2p and Crust crates. We aim to make the sockets easy to use and reduce boilerplate code. The sockets buffer incoming/outgoing data, implement message serialization and encryption, the user of the stream based sockets don't need to worry about message boundaries, each message has a priority, number etc.

Dependencies

~15MB
~275K SLoC