Internet client and server support.
make System.network.socket(domain, type, protocol)
: Constructs a new socket.domain
: The socket's domaintype
: The socket's typeprotocol
: The socket's protocol.destruct System.network.socket()
: Class destructor.AF_INET
: AF_INETAF_INET6
: AF_INET6AF_UNIX
: AF_UNIXAF_UNSPEC
: AF_UNSPECSOCK_DGRAM
: SOCK_DGRAMSOCK_SEQPACKET
: SOCK_SEQPACKETSOCK_STREAM
: SOCK_STREAM__destruct__()
: Class destructor.accept()
: Accepts a new connection from the listening socket.bind(host, port)
: Binds socket to given host and port.host
: Host/filename to bind to.port
: Port to bind to (for Unix sockets, ignored).close()
: Closes socket and prevents further operations on it.connect(host, port)
: Connects to given host and port.host
: Host/filename to connect to.port
: Port to connect to (for Unix sockets, ignored).listen(queue)
: Listen for connections on given socket.queue
: The size of the listen queue.read(size)
: Read bytes from socket and place in a string.size
: Number of bytes to read.readline()
: Reads a line of text into a string.write(str)
: Writes bytes to socket.str
: Text to write.