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

may
fun net_fault(operation: Str, code: Int, detail: Str) -> Never

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_check

may
fun net_check(operation: Str, status: Int) -> Int

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_timeout

may
fun net_timeout(ms: Int) -> Nil

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_deadline

may
fun net_deadline(ms: Int) -> Float

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_now

may
fun net_now() -> Float

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_remaining

may
fun net_remaining(deadline: Float) -> Int

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_open

may
fun net_open(s: Socket, kind: Str) -> Int

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

byte_length

may
pub fun byte_length(data: Str) -> Int

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_buffer

may
fun net_buffer(size: Int) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_trim

may
fun net_trim(data: Str, size: Int) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

bytes

may
pub fun bytes(data: Str) -> List<Int>

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

from_bytes

may
pub fun from_bytes(values: List<Int>) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

ipv4

may
pub fun ipv4(host: Str) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

address

may
pub fun address(host: Str, port: Int) -> Address

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_sockaddr

may
fun net_sockaddr(a: Address) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_decode

may
fun net_decode(data: Str) -> Address

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_socket

may
fun net_socket(kind: Str, type: Int) -> Socket

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_discard

may
fun net_discard(s: Socket) -> Nil

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

socket_close

may
pub fun socket_close(s: Socket) -> Nil

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

socket_set_timeout

may
pub fun socket_set_timeout(s: Socket, ms: Int) -> Nil

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_poll

may
fun net_poll(fd: Int, writing: Bool, deadline: Float) -> Bool

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

socket_wait

may
pub fun socket_wait(s: Socket, writing: Bool, ms: Int) -> Bool

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_ready

may
fun net_ready(s: Socket, writing: Bool, deadline: Float, operation: Str) -> Nil

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

socket_local_address

may
pub fun socket_local_address(s: Socket) -> Address

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

socket_peer_address

may
pub fun socket_peer_address(s: Socket) -> Address

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

with_socket

may
pub fun with_socket<T>(s: Socket, action: (Socket) -> T) -> T

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

tcp_connect

may
pub fun tcp_connect(host: Str, port: Int) -> Socket

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

tcp_connect_timeout

may
pub fun tcp_connect_timeout(host: Str, port: Int, ms: Int) -> Socket

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

tcp_listen

may
pub fun tcp_listen(host: Str, port: Int) -> Socket

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

tcp_accept

may
pub fun tcp_accept(listener: Socket) -> Socket

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

tcp_send

may
pub fun tcp_send(s: Socket, data: Str) -> Int

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

net_receive

may
fun net_receive(s: Socket, data: Str, offset: Int, count: Int, deadline: Float) -> Int

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

tcp_receive

may
pub fun tcp_receive(s: Socket, max_bytes: Int) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

tcp_receive_exact

may
pub fun tcp_receive_exact(s: Socket, count: Int) -> Str

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

tcp_shutdown

may
pub fun tcp_shutdown(s: Socket, how: Str) -> Nil

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

udp_bind

may
pub fun udp_bind(host: Str, port: Int) -> Socket

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

udp_send_to

may
pub fun udp_send_to(s: Socket, data: Str, destination: Address) -> Int

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

udp_receive_from

may
pub fun udp_receive_from(s: Socket, max_bytes: Int) -> Datagram

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

Types

Address

may
pub struct Address { host: Str, port: Int }

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source

Socket

may
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

may
pub struct Datagram { data: Str, sender: Address }

No description yet. Read the declaration source for the exact contract.

supported · full runtime · source