FANDOM


View this page on the Official ComputerCraft Wiki: http://computercraft.info/wiki/index.php?title=Rednet_(API)

The rednet API provides a capacity for Computers to communicate between themselves using a wireless modem.

To 'open' or 'close' a side to rednet, allowing or disallowing it to be used to commnuicate:

  • rednet.open( "side" )
  • rednet.close( "side" )

Also, to check if a side is open or closed:

  • rednet.isOpen("side")

To start running rednet (Warning, runs rednet but if rednet's already being run it will error out)

  • rednet.run()


Functions for sending messages to other computers:

  • rednet.announce()
  • rednet.send( receiverID, message ) -- Send to a specific computer
  • rednet.broadcast( message ) -- Send to all computers


Functions for receiving messages:

  • rednet.receive( timeout ) -- Returns: senderID, message -- timeout is the amount of time the program will wait for an 'answer', is optional.

You can also handle the "rednet_message" event to receive messages without calling receive(), the arguments are the same as the receive() return values.

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.