Registry / networking / bitcoin-sock

bitcoin-sock

JSON →
library0.1.19rscratesunverified

Low-level, cross-platform RAII wrapper and utilities for raw OS sockets, mirroring Bitcoin Core networking semantics (send/recv, timeouts, readiness, error classification).

# Cargo.toml [dependencies] bitcoin-sock = "0.1.19"
INSTALL
IMPORT
SIG · BITCOIN-SOCK
B
bitcoin-sock
networkingrustv0.1.19
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Socket
use bitcoin_sock::Socket;

Create a new socket and connect to a Bitcoin peer.

use bitcoin_sock::Socket; fn main() -> std::io::Result<()> { let socket = Socket::new()?; socket.connect("127.0.0.1:8333")?; println!("Connected to Bitcoin peer"); Ok(()) }
Debug
Known issues
gotchaThis is a low-level socket wrapper; ensure proper error handling for network operations.
fix
Wrap socket operations in appropriate error handling and consider using async runtimes if needed.
affects: >=0.1.0
Upgrade
Version history
0.1.19latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
36 hits · last 30 days
node
30
OpenAI (training)
1
Resources
bitcoin-sock — cargo add bitcoin-sock · libregistry