Added close()

CokaCola 2014-03-10 08:13:40 -07:00
parent 7c15c38b97
commit caab2983d7

@ -10,6 +10,8 @@ Callbacks:
Returns whether the specified "port" is currently being listened on. Messages only trigger signals when they arrive on a port that is open.
- `open(port: number): boolean`
Opens the specified port number for listening. Returns `true` if the port was opened, `false` if it was already open.
- `close([port: number]): boolean`
Closes the specified port (default: all ports). Returns true if ports were closed.
- `send(address: string, port: number[, ...]): boolean`
Sends a network message to the specified address. Returns `true` if the message was sent. This does *not* mean the message was received, only that it was sent. No port-sniffing for you.
Any additional arguments are passed along as data. These arguments must be basic types: nil, boolean, number and string values are supported, tables and functions are not. See [[the text API|API/Text]] for serialization of tables.