1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-11-23 02:28:05 +11:00

documented socket objects

This commit is contained in:
Izaya 2018-03-30 14:21:59 +11:00
parent 70ea253c39
commit ece287a699

View File

@ -33,6 +33,18 @@ Listens for socket connections on *port*, in a blocking manner, and returns a so
#### net.flisten(*port*,*handler*)
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.
### Socket objects
Sockets have a few simple functions, which are the same as the normal Minitel version, despite using different names for functions.
#### socket:r(*length*)
Reads *length* bytes from the socket.
#### socket:w(*data*)
Writes *data* to the socket, sending it to the other machine.
#### socket:c()
Closes the socket, and sends the close signal to the other machine.
## Configuration
### microtel-3