Rednet API
|
|||||||||||
Broadcasts a string message over the predefined rednet.CHANNEL_BROADCAST channel (default 65535), assuming rednet has been opened. The message will be received by every device listening to rednet.
|
|||||||||||
Syntax | rednet.broadcast(
|
||||||||||
Returns | nil | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | rednet | ||||||||||
|
|
|||||||||||
Closes rednet on the modem attached to side.
|
|||||||||||
Syntax | rednet.close(
|
||||||||||
Returns | nil | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | rednet | ||||||||||
See also | rednet.open | ||||||||||
|
Rednet.host
|
|||||||||||
Checks if a modem is open on Rednet. channel must be a Modem or side, like “modem_1234” or “top” | |||||||||||
Syntax | rednet.isOpen(
|
||||||||||
Returns | boolean open | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | rednet | ||||||||||
|
Rednet.lookup
|
|||||||||||
Opens rednet on the modem attached to side.
|
|||||||||||
Syntax | rednet.open(
|
||||||||||
Returns | nil | ||||||||||
Part of | CC:Tweaked (source) | ||||||||||
API | rednet | ||||||||||
See also | rednet.close | ||||||||||
| |||||||||||
|
|
|||||||||||
Waits for a Rednet message to be received by an opened modem, or until timeout seconds elapse. Takes another optional parameter, which limits messages able to be received to those broadcasted or sent with a matching protocol.
|
|||||||||||
Syntax | rednet.receive(
|
||||||||||
Returns | number senderID, any message, string protocol | ||||||||||
Part of | Rednet API (source) | ||||||||||
API | rednet | ||||||||||
| |||||||||||
| |||||||||||
|
Rednet.run
|
|||||||||||
Sends a Rednet message to be received by a specific computer (whose id is id.) Takes another optional parameter, protocol, which specifies what the message is for. It returns false if the message was unable to be sent, but true if it was sent.
Make sure your modem is opened with rednet.open! |
|||||||||||
Syntax | rednet.send(
|
||||||||||
Returns | bool success | ||||||||||
Part of | Rednet API (source) | ||||||||||
API | rednet | ||||||||||
| |||||||||||
|
Rednet.unhost