Skip to content

Commit cf4a285

Browse files
transports/unix-stream: add
Ripped 100% off transports/tcp Uses proposed encoding from multiformats/multiaddr#174 (comment)
1 parent 00e0d29 commit cf4a285

File tree

10 files changed

+1060
-4
lines changed

10 files changed

+1060
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
- [`libp2p-pnet` CHANGELOG](transports/pnet/CHANGELOG.md)
3232
- [`libp2p-quic` CHANGELOG](transports/quic/CHANGELOG.md)
3333
- [`libp2p-tcp` CHANGELOG](transports/tcp/CHANGELOG.md)
34+
- [`libp2p-unix-stream` CHANGELOG](transports/unix-stream/CHANGELOG.md)
3435
- [`libp2p-tls` CHANGELOG](transports/tls/CHANGELOG.md)
3536
- [`libp2p-uds` CHANGELOG](transports/uds/CHANGELOG.md)
3637
- [`libp2p-wasm-ext` CHANGELOG](transports/wasm-ext/CHANGELOG.md)

Cargo.lock

Lines changed: 23 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ members = [
5858
"transports/pnet",
5959
"transports/quic",
6060
"transports/tcp",
61+
"transports/unix-stream",
6162
"transports/tls",
6263
"transports/uds",
6364
"transports/webrtc-websys",

transports/tcp/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,8 +402,7 @@ where
402402
(Err(err), _) => return Err(err),
403403
};
404404

405-
let stream = T::new_stream(socket.into()).await?;
406-
Ok(stream)
405+
T::new_stream(socket.into()).await
407406
}
408407
.boxed())
409408
}

transports/unix-stream/CHANGELOG.md

Whitespace-only changes.

transports/unix-stream/Cargo.toml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
[package]
2+
name = "libp2p-unix-stream"
3+
edition.workspace = true
4+
rust-version = { workspace = true }
5+
description = "UNIX-domain stream socket transport protocol for libp2p"
6+
version = "0.43.0"
7+
authors = ["Parity Technologies <[email protected]>"]
8+
license = "MIT"
9+
repository = "https://github.com/libp2p/rust-libp2p"
10+
keywords = ["peer-to-peer", "libp2p", "networking"]
11+
categories = ["network-programming", "asynchronous"]
12+
13+
[dependencies]
14+
async-io = { version = "2.3.3", optional = true }
15+
futures = { workspace = true }
16+
futures-timer = "3.0"
17+
libp2p-core = { workspace = true }
18+
percent-encoding-rfc3986 = "0.1"
19+
tokio = { workspace = true, default-features = false, features = ["net"], optional = true }
20+
tracing = { workspace = true }
21+
22+
[features]
23+
tokio = ["dep:tokio"]
24+
async-io = ["dep:async-io"]
25+
26+
[dev-dependencies]
27+
async-std = { version = "1.6.5", features = ["attributes"] }
28+
tokio = { workspace = true, features = ["full"] }
29+
tracing-subscriber = { workspace = true, features = ["env-filter"] }
30+
31+
# Passing arguments to the docsrs builder in order to properly document cfg's.
32+
# More information: https://docs.rs/about/builds#cross-compiling
33+
[package.metadata.docs.rs]
34+
all-features = true
35+
36+
37+
[lints]
38+
workspace = true

0 commit comments

Comments
 (0)