Updated Component Modem (markdown)

Florian Nücke 2014-03-14 01:33:27 -07:00
parent 4d3ff95f21
commit bcab9de17d

@ -5,7 +5,7 @@ Callbacks:
- `isWireless(): boolean`
Returns whether this modem is capable of sending wireless messages.
- `maxPacketSize(): number`
Returns the maximum packet size for sending messages via network cards. Defaults to 8192, doesn't apply to HTTP traffic. You can change this in the OpenComputer configuration file.
Returns the maximum packet size for sending messages via network cards. Defaults to 8192. You can change this in the OpenComputer configuration file.
- `isOpen(port: number): boolean`
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`
@ -32,8 +32,6 @@ This component generates a signal named `modem_message` if a message from anothe
- `distance` is the distance to the modem that sent the message. This is only set for wireless messages. For normal messages this is always 0.
- All further values are values passed along by the sender (i.e. the `...` in `send` and `broadcast`).
*A note on HTTP requests*: if enabled in the configuration, wireless modems can be used to make HTTP requests. For this, call `send` with a URL instead of a component address. The recommended way of doing this is via the [[HTTP API|API/HTTP]], however.
Example use:
```lua
local component = require("component")