audio bus crypto display ez global gps keyboard mesh net radio sprite storage synth system wifi

Functions

tcp_accept() → integer|nil Non-blocking accept. Returns a new client handle or nil.
ez.net.tcp_accept(server_id) -> integer|nil
tcp_close() Close a TCP server or client handle, freeing its slot. Safe
ez.net.tcp_close(handle)
tcp_connect() → integer|nil Connect to a remote TCP server. Blocks up to timeout_ms on the
ez.net.tcp_connect(ip, port, timeout_ms?) -> integer|nil
tcp_connected() → boolean True iff the socket is still open or has buffered unread bytes.
ez.net.tcp_connected(client_id) -> boolean
tcp_listen() → integer|nil Open a TCP listening socket
ez.net.tcp_listen(port) -> integer|nil
Binds a new TCP server to the given port and returns a slot handle. Accept incoming clients with ez.net.tcp_accept. Nil is returned when no slots are free (max 4 concurrent servers) or bind fails. The server is in non-blocking accept mode; tcp_accept polls.
tcp_recv() → string|nil Non-blocking read. nil = no data / error, "" = peer closed,
ez.net.tcp_recv(client_id, max_bytes?) -> string|nil
tcp_send() → integer|nil Best-effort non-blocking send. Returns bytes actually written.
ez.net.tcp_send(client_id, data) -> integer|nil
udp_close() Close and free the UDP slot.
ez.net.udp_close(udp_id)
udp_open() → integer|nil Open a UDP socket bound to the given port. port=0 or nil picks
ez.net.udp_open(port?) -> integer|nil
udp_recv() → data, ip, port or nil Non-blocking receive. Returns the next pending datagram's
ez.net.udp_recv(udp_id) -> data, ip, port or nil
udp_send() → integer|nil Send a single UDP datagram. Returns payload length on success
ez.net.udp_send(udp_id, ip, port, data) -> integer|nil