Registry / networking / net2
library0.2.39rscratesunverified

Extensions to the standard library's networking types as proposed in RFC 1158.

# Cargo.toml [dependencies] net2 = "0.2.39"
INSTALL
IMPORT
SIG · NET2
N
net2
networkingrustv0.2.39
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.

TcpBuilder
use net2::TcpBuilder;

Create a TCP listener with custom socket options using net2.

use net2::TcpBuilder; fn main() { let builder = TcpBuilder::new_v4().unwrap(); builder.reuse_address(true).unwrap(); let listener = builder.listen("127.0.0.1:8080").unwrap(); println!("Listening on port 8080"); }
Debug
Known issues
breakingDeprecated in favor of socket2 crate.
fix
Migrate to the `socket2` crate for similar functionality.
affects: >=0.2.0
Upgrade
Version history
0.2.39latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
7 hits · last 30 days
node
6
Amazon
1
Resources
net2 — cargo add net2 · libregistry