0 branches
Tree Top files
Code
Clone with HTTPS:
56 years ago
..
websocket websocket: fmt last Apr 24 73.14 KB
conv all: super_batch6 fixes last Apr 17 6.33 KB
ftp all: super_batch6 fixes last Apr 17 7.26 KB
jsonrpc all: more fixes last Apr 19 32.05 KB
urllib all: super_batch6 fixes last Apr 17 39.11 KB
net_nix.c.v veb: fasthttp + sse fixes last Apr 13 594 bytes
errors.c.v all: super_batch3 fixes last Apr 13 2.27 KB

Description

net provides networking functions. It is mostly a wrapper to BSD sockets, so you can listen on a port, connect to remote TCP/UDP services, and communicate with them.

UDP multicast example:

import net

mut socket := net.listen_udp('0.0.0.0:9999')!
socket.join_multicast_group('224.0.0.1', '0.0.0.0')!
socket.set_multicast_ttl(2)!
socket.set_multicast_loop(true)!