Module: net.socket
Source: ./net/socket.reef
Overview
net.socket - Low-level socket constants and utilities
Provides socket-related constants (AF_INET, SOCK_STREAM, etc.) and utilities. Most users should use net.tcp or net.udp instead.
Functions
fn AF_INET(): int
Address family constants
fn AF_INET6(): int
fn AF_UNIX(): int
fn SOCK_STREAM(): int
Socket type constants
fn SOCK_DGRAM(): int
fn SHUT_RD(): int
Shutdown mode constants
fn SHUT_WR(): int
fn SHUT_RDWR(): int
fn NET_OK(): int
Error code constants
fn NET_ERROR(): int
fn NET_TIMEOUT(): int
fn NET_CLOSED(): int
fn net_last_error(): int
Utility function wrappers
fn net_error_string(errcode: int): string
fn net_is_ipv6(addr: string): bool
fn net_err(): error.Error
Maps the runtime's thread-local last errno (via reef_net_error_kind(), see reef_net.c for the portable errno -> kind table) to a core.error.Error carrying the matching ErrorKind and a strerror() message. Shared by every net package (tcp/udp/unix/dns) as the source of their Result Errs.
Generated by reefc doc