Registry / networking / socket2

socket2

JSON →
library0.6.4rscratesunverified

Utilities for handling networking sockets with a maximal amount of configuration possible.

# Cargo.toml [dependencies] socket2 = "0.6.4"
INSTALL
IMPORT
SIG · SOCKET2
S
socket2
networkingrustv0.6.4
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 socket2::Socket;

Creates a TCP socket using socket2.

use socket2::{Socket, Domain, Type}; fn main() -> std::io::Result<()> { let socket = Socket::new(Domain::IPV4, Type::STREAM, None)?; println!("Socket created: {:?}", socket); Ok(()) }
Debug
Known issues
gotchaOn Windows, socket types and functions may differ; ensure cross-platform testing.
fix
Use conditional compilation or test on all target platforms.
affects: >=0.4.0
Upgrade
Version history
0.6.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
Amazon
1
OpenAI (training)
1
Resources
socket2 — cargo add socket2 · libregistry