Rednet API
Note: This function call requires a Modem peripheral to be attached to the computer. See Networking for more information.
Note: Rednet is not secure against interception or spoofing. See Network security#Rednet for more information.
|
|||||||||||
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 Rednet.isOpen 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 | ||||||||||
| |||||||||||
| |||||||||||
|
|
|||||||||||
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 | ||||||||||
| |||||||||||
|