Library guide · API index and notation
This page is generated from the bundled library in this checkout. Signatures and adjacent source comments are reproduced below; the linked guide explains usage, storage, failures, and platform support.
import "std/net/linux"
This is a provider or implementation package. Start with the linked guide’s application API; native declarations depend on the selected target.
Names used in signatures
Unqualified names denote this package’s types (including other source files in the same package), language built-ins, or generic parameters such as T. Qualified names use the import aliases below. These aliases belong to the library source; import a dependency yourself to use its alias in your program.
| Alias | Package | Source file |
|---|---|---|
hosted |
std/time/hosted |
linux.dodo |
io |
std/io |
linux.dodo |
net |
std/net |
linux.dodo |
ptr |
core/ptr |
linux.dodo |
from_code
Function · Source
pub fn from_code(code: i32) -> net.Error
POLL_CAPACITY
Constant · Source
A bounded readiness set; no socket ownership or pointer survives wait().
pub const POLL_CAPACITY: usize = 256
PollSet
Struct · Source
pub struct PollSet {
// Private implementation fields omitted.
}
PollSet.new
Function · Source
pub fn new() -> PollSet
PollSet.clear
Function · Source
pub fn clear(&mut self)
PollSet.ready
Function · Source
pub fn ready(&self, index: usize) -> bool
PollSet.wait
Function · Source
pub fn wait(&mut self, milliseconds: u32) -> usize!net.Error
TcpConnection
Struct · Source
pub struct TcpConnection {
// Private implementation fields omitted.
}
TcpConnection.closed
Function · Source
pub fn closed() -> TcpConnection
TcpConnection.register
Function · Source
pub fn register(&self, set: &mut PollSet, interest: net.Interest) -> usize!net.Error
TcpConnection.connect
Function · Source
pub fn connect(address: &net.SocketAddress) -> TcpConnection!net.Error
TcpConnection.poll_connected
Function · Source
pub fn poll_connected(&mut self) -> bool!net.Error
TcpConnection.local_address
Function · Source
pub fn local_address(&self) -> net.SocketAddress!net.Error
TcpConnection.peer_address
Function · Source
pub fn peer_address(&self) -> net.SocketAddress!net.Error
TcpConnection.wait_ready
Function · Source
pub fn wait_ready(&self, interest: net.Interest, milliseconds: u32) -> bool!net.Error
TcpConnection.raw_handle
Function · Source
Raw access neither transfers ownership nor permits close/retained I/O.
pub unsafe fn raw_handle(&self) -> isize
Requires an unsafe context. Follow the source safety preconditions and the linked guide before calling this API.
TcpConnection.close
Function · Source
pub fn close(&mut self) -> void!net.Error
TcpConnection.read
Function · Source
pub fn read(&mut self, destination: &mut[u8]) -> usize!io.Error
TcpConnection.write
Function · Source
pub fn write(&mut self, source: &[u8]) -> usize!io.Error
TcpConnection.poll_read
Function · Source
pub fn poll_read(&mut self, destination: &mut[u8]) -> io.Poll!io.Error
TcpConnection.poll_write
Function · Source
pub fn poll_write(&mut self, source: &[u8]) -> io.Poll!io.Error
TcpConnection.shutdown
Function · Source
pub fn shutdown(&mut self, direction: net.Shutdown) -> void!net.Error
TcpListener
Struct · Source
pub struct TcpListener {
// Private implementation fields omitted.
}
TcpListener.bind
Function · Source
pub fn bind(address: &net.SocketAddress, backlog: u32) -> TcpListener!net.Error
TcpListener.register
Function · Source
pub fn register(&self, set: &mut PollSet) -> usize!net.Error
TcpListener.local_address
Function · Source
pub fn local_address(&self) -> net.SocketAddress!net.Error
TcpListener.wait_ready
Function · Source
pub fn wait_ready(&self, milliseconds: u32) -> bool!net.Error
TcpListener.accept
Function · Source
pub fn accept(&mut self) -> Option<TcpConnection>!net.Error
TcpListener.close
Function · Source
pub fn close(&mut self) -> void!net.Error
Datagram
Struct · Source
pub struct Datagram {
pub transferred: usize
pub peer: net.SocketAddress
pub truncated: bool
// Windows cannot report original length after consuming an oversized packet.
pub original_size: Option<usize>
}
UdpSocket
Struct · Source
pub struct UdpSocket {
// Private implementation fields omitted.
}
UdpSocket.bind
Function · Source
pub fn bind(address: &net.SocketAddress) -> UdpSocket!net.Error
UdpSocket.local_address
Function · Source
pub fn local_address(&self) -> net.SocketAddress!net.Error
UdpSocket.wait_ready
Function · Source
pub fn wait_ready(&self, interest: net.Interest, milliseconds: u32) -> bool!net.Error
UdpSocket.send_to
Function · Source
pub fn send_to(&mut self, data: &[u8], destination: &net.SocketAddress) -> usize!net.Error
UdpSocket.receive_from
Function · Source
Exactly one packet is consumed, including an empty datagram or a zero capacity destination. Truncated suffixes are discarded by the OS.
pub fn receive_from(&mut self, data: &mut[u8]) -> Datagram!net.Error
UdpSocket.close
Function · Source
pub fn close(&mut self) -> void!net.Error
Addresses
Struct · Source
Explicitly selected platform resolver; synchronous and not interruptible. Result owns a checked borrow of caller storage containing 24-byte addresses.
pub struct Addresses {
pub truncated: bool
// Private implementation fields omitted.
}
Addresses.len
Function · Source
pub fn len(&self) -> usize
Addresses.get
Function · Source
pub fn get(&self, index: usize) -> net.SocketAddress!net.Error
resolve
Function · Source
pub fn resolve(host: &[u8], port: u16, workspace: &mut[u8]) -> Addresses!net.Error from(workspace)
resolve_numeric
Function · Source
Select the platform numeric parser without consulting any name service.
pub fn resolve_numeric(host: &[u8], port: u16, workspace: &mut[u8]) -> Addresses!net.Error from(workspace)
MonotonicClock
Struct · Source
pub struct MonotonicClock {
}
MonotonicClock.now_ms
Function · Source
pub fn now_ms(&mut self) -> u64
connect_with
Function · Source
Blocking composition is explicit and bounded to at most 10ms per readiness wait. No worker or background operation is created. Cancellation has precedence.
pub fn connect_with<C, X>(address: &net.SocketAddress, operation: &net.Operation, clock: &mut C, cancel: &X) -> TcpConnection!net.Error