Easy-to-implement networking protocol for OpenComputers
Minitel for embedded devices.
Sends a packet to dest on vport, containing data, optionally with packet type and ID as specified in packetType and packetID (defaults to 1 and randomly generated)
Sends an arbitrary length of data, reliably and in order, to dest on port.
Creates a socket object connected to address on port, with the close message as sclose. Shouldn’t be used by programs.
Tries to connect a socket to address on port.
Listens for socket connections on port, in a blocking manner, and returns a socket object on success.
Adds a hook to run a handler function when a client tries to initiate a socket connection on port, giving the handler a socket object.
Sockets have a few simple functions, which are the same as the normal Minitel version, despite using different names for functions.
Reads length bytes from the socket.
Writes data to the socket, sending it to the other machine.
Closes the socket, and sends the close signal to the other machine.
Setting net.port changes which physical network port the Microtel stack listens on. If changed after initial loading of Microtel, you’ll need to open the ports on the modems yourself. Defaults to 4096.
The name of this minitel node. Defaults to the first 8 characters of the computer address, so, for example, 15744e80.
Boolean controlling whether to forward packets.
Table containing functions to run on receiving an event.
This controls the maximum size of the data portion of packets for net.lsend. Defaults to 4096, half the default physical MTU.
The maximum time the machine will wait to initialize a connection. Defaults to 60. Not actually functional right now.