Skip to main content

Module network_ops

Module network_ops 

Source
Expand description

Network operation implementations for the io module.

TCP: tcp_connect, tcp_listen, tcp_accept, tcp_read, tcp_write, tcp_close UDP: udp_bind, udp_send, udp_recv

All operations use blocking std::net (not tokio).

Functionsยง

io_tcp_accept
io.tcp_accept(listener) -> IoHandle
io_tcp_close
io.tcp_close(handle) -> bool
io_tcp_connect
io.tcp_connect(addr) -> IoHandle
io_tcp_listen
io.tcp_listen(addr) -> IoHandle
io_tcp_read
io.tcp_read(handle, n?) -> string
io_tcp_write
io.tcp_write(handle, data) -> int
io_udp_bind
io.udp_bind(addr) -> IoHandle
io_udp_recv
io.udp_recv(handle, n?) -> object { data: string, addr: string }
io_udp_send
io.udp_send(handle, data, target_addr) -> int