net module
Maylang standard-library module.
import "net" as net;
Module note — Requires the full Linux x86-64 native runtime; core/raw builds do not support this module.
Functions
net_fault
fun net_fault(operation: Str, code: Int, detail: Str) -> NeverNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_check
fun net_check(operation: Str, status: Int) -> IntNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_timeout
fun net_timeout(ms: Int) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_deadline
fun net_deadline(ms: Int) -> FloatNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_now
fun net_now() -> FloatNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_remaining
fun net_remaining(deadline: Float) -> IntNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_open
fun net_open(s: Socket, kind: Str) -> IntNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
byte_length
pub fun byte_length(data: Str) -> IntNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_buffer
fun net_buffer(size: Int) -> StrNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_trim
fun net_trim(data: Str, size: Int) -> StrNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
bytes
pub fun bytes(data: Str) -> List<Int>No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
from_bytes
pub fun from_bytes(values: List<Int>) -> StrNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
ipv4
pub fun ipv4(host: Str) -> StrNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
address
pub fun address(host: Str, port: Int) -> AddressNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_sockaddr
fun net_sockaddr(a: Address) -> StrNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_decode
fun net_decode(data: Str) -> AddressNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_socket
fun net_socket(kind: Str, type: Int) -> SocketNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_discard
fun net_discard(s: Socket) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
socket_close
pub fun socket_close(s: Socket) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
socket_set_timeout
pub fun socket_set_timeout(s: Socket, ms: Int) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_poll
fun net_poll(fd: Int, writing: Bool, deadline: Float) -> BoolNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
socket_wait
pub fun socket_wait(s: Socket, writing: Bool, ms: Int) -> BoolNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_ready
fun net_ready(s: Socket, writing: Bool, deadline: Float, operation: Str) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
socket_local_address
pub fun socket_local_address(s: Socket) -> AddressNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
socket_peer_address
pub fun socket_peer_address(s: Socket) -> AddressNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
with_socket
pub fun with_socket<T>(s: Socket, action: (Socket) -> T) -> TNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
tcp_connect
pub fun tcp_connect(host: Str, port: Int) -> SocketNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
tcp_connect_timeout
pub fun tcp_connect_timeout(host: Str, port: Int, ms: Int) -> SocketNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
tcp_listen
pub fun tcp_listen(host: Str, port: Int) -> SocketNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
tcp_accept
pub fun tcp_accept(listener: Socket) -> SocketNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
tcp_send
pub fun tcp_send(s: Socket, data: Str) -> IntNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
net_receive
fun net_receive(s: Socket, data: Str, offset: Int, count: Int, deadline: Float) -> IntNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
tcp_receive
pub fun tcp_receive(s: Socket, max_bytes: Int) -> StrNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
tcp_receive_exact
pub fun tcp_receive_exact(s: Socket, count: Int) -> StrNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
tcp_shutdown
pub fun tcp_shutdown(s: Socket, how: Str) -> NilNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
udp_bind
pub fun udp_bind(host: Str, port: Int) -> SocketNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
udp_send_to
pub fun udp_send_to(s: Socket, data: Str, destination: Address) -> IntNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
udp_receive_from
pub fun udp_receive_from(s: Socket, max_bytes: Int) -> DatagramNo description yet. Read the declaration source for the exact contract.
supported · full runtime · source
Types
Address
pub struct Address { host: Str, port: Int }No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
Socket
pub struct Socket { fd: Int, kind: Str, timeout_ms: Int }No description yet. Read the declaration source for the exact contract.
supported · full runtime · source
Datagram
pub struct Datagram { data: Str, sender: Address }No description yet. Read the declaration source for the exact contract.
supported · full runtime · source