Skip to main content

Module socket

Module socket 

Source
Expand description

Low-level socket creation and management.

This module provides functions for creating and configuring UDP and TCP sockets with support for interface binding, port reuse, and other socket options.

§Examples

use rust_p2p_core::socket::{create_udp_socket, LocalInterface};
use std::net::SocketAddr;

let addr: SocketAddr = "0.0.0.0:0".parse().unwrap();
let socket = create_udp_socket(addr, None)?;

Structs§

LocalInterface
Network interface identifier for binding sockets.

Functions§

bind_udp