NAME
Zuzu::Module::Socks - builtin std/io/socks module.
SYNOPSIS
from std/io/socks import *;
let srv := listen_tcp( "127.0.0.1", 0 );
let cli := connect_tcp( "127.0.0.1", srv.port() );
let peer := srv.accept();
cli.say( "hello" );
let line := peer.next_line();
DESCRIPTION
This module exposes practical networking helpers for:
TCP client/server sockets.
UDP sockets using datagram send/recv.
Unix-domain stream sockets.
Where possible, socket methods are aligned with stream/file interfaces, including read, write, print, say, next_line, each_line, and close.
EXPORTED SYMBOLS
Socket-
Common stream-like methods across socket objects.
TCPSocket,TCPServer-
TCP client/server classes.
UDPSocket-
UDP socket class with
sendandrecv. UnixSocket,UnixServer-
Unix-domain stream client/server classes.
connect_tcp,listen_tcp-
Create TCP client/server sockets.
bind_udp,connect_udp-
Create UDP sockets.
listen_unix,connect_unix-
Create Unix-domain stream sockets.
COPYRIGHT AND LICENCE
Zuzu::Module::Socks is copyright Toby Inkster.
It is free software; you may redistribute it and/or modify it under the terms of either the Artistic License 1.0 or the GNU General Public License version 2.