diff --git a/Component-Modem.md b/Component-Modem.md index 3feafb6..3749e2c 100644 --- a/Component-Modem.md +++ b/Component-Modem.md @@ -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.