#tokio #lightning #connection #wish #sockets #tcp-stream #reference

lightning-net-tokio

Implementation of the rust-lightning network stack using Tokio. For Rust-Lightning clients which wish to make direct connections to Lightning P2P nodes, this is a simple alternative to implementing the required network stack, especially for those already using Tokio

38 releases

new 0.0.123-beta Apr 19, 2024
0.0.121 Jan 23, 2024
0.0.119 Dec 16, 2023
0.0.118 Oct 24, 2023
0.0.1 Jun 1, 2019

#2569 in Magic Beans

Download history 326/week @ 2023-12-23 746/week @ 2023-12-30 1287/week @ 2024-01-06 1267/week @ 2024-01-13 2036/week @ 2024-01-20 1951/week @ 2024-01-27 1628/week @ 2024-02-03 2439/week @ 2024-02-10 2594/week @ 2024-02-17 1841/week @ 2024-02-24 2975/week @ 2024-03-02 3033/week @ 2024-03-09 1932/week @ 2024-03-16 1589/week @ 2024-03-23 2180/week @ 2024-03-30 1851/week @ 2024-04-06

7,893 downloads per month
Used in 3 crates

MIT/Apache

6.5MB
104K SLoC

A socket handling library for those running in Tokio environments who wish to use rust-lightning with native TcpStreams.

Designed to be as simple as possible, the high-level usage is almost as simple as "hand over a TcpStream and a reference to a PeerManager and the rest is handled".

The PeerManager, due to the fire-and-forget nature of this logic, must be a reference, (e.g. an [Arc]) and must use the SocketDescriptor provided here as the PeerManager's SocketDescriptor implementation.

Three methods are exposed to register a new connection for handling in tokio::spawn calls; see their individual docs for details.

Dependencies

~9–19MB
~178K SLoC