Benign crates 2,927,156 installs Download

libp2p-uds 0.20.0

“Unix domain sockets transport for libp2p”

Rust binds a Unix-domain socket listenerRust test marker or harness
SHA-256b9db9fce9e3588c3118475d9ca761c5c133b639a624a7341e2a61e4b28c376b8

Evidence

Temp or Tmp path segment lib.rs · lines 29–32
29:10… UdsConfig` transport supports multiaddresses of the form `/unix//tmp/foo`.
30//!
31//! The `UdsConfig` structs implements the `Transport` trait of the `core` library. See the
32//! documentation of `core …
imports futures::future::BoxFuture lib.rs · lines 35–48
35:41… t(target_os = "emscripten")))))]
36
37use futures::{prelude::*, future::{BoxFuture, Ready}};
38use futures::stream::BoxStream;
39use libp2p_core::{
40 Transport,
41 multiaddr::{Protocol, Multiaddr},
42 transport::{ListenerEvent, TransportError}
43};
44use log::debug;
45use std::{io, path::PathBuf};
46
47macro_rules! codegen {
48 ($feature_name:expr, $uds_config:ident, $build_listener:expr, $unix_st …
References the Tokio async runtime namespace lib.rs · lines 120–133
120:2… UdsConfig,
121 |addr| async move { async_std::os::unix::net::UnixListener::bind(addr).await },
122 async_std::os::unix::net::UnixStream,
123);
124#[cfg(feature = "tokio")]
125codegen!(
126 "tokio",
127 TokioUdsConfig,
128 |addr| async move { tokio::net::UnixListener::bind(addr) },
129 tokio::net::UnixStream,
130 mut
131);
132
133/// Turns a `Multiaddr` containing a single `Unix` comp …
imports tempfile lib.rs · lines 158–178
158:22… re = "async-std"))]
159mod tests {
160 use super::{multiaddr_to_path, UdsConfig};
161 use futures::{channel::oneshot, prelude::*};
162 use std::{self, borrow::Cow, path::Path};
163 use libp2p_core::{Transport, multiaddr::{Protocol, Multiaddr}};
164 use tempfile;
165
166 #[test]
167 fn multiaddr_to_path_conversion() {
168 assert!(
⋯10 lines
References a public code-forge URL CHANGELOG.md · lines 1–9
1# 0.20.0 [2020-07-01]
2
3- Updated dependencies.
4- Conditional compilation fixes for the `wasm32-wasi` target
5 ([PR 1633](https://github.com/libp2p/rust-libp2p/pull/1633)).
6
7# 0.19.2 [2020-06-22]
8
9- Updated dependencies.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.