Difference between revisions of "Rednet (API)"

From ComputerCraft Wiki
Jump to: navigation, search
(Created page with "The rednet API provides a simple computer networking model over RedPower bundled cables. Functions for specifiying sides to be used for networking; *rednet.open( side ) *redn...")
 
Line 13: Line 13:
 
*rednet.receive( timeout ) -- Returns: senderID, message
 
*rednet.receive( timeout ) -- Returns: senderID, message
 
*You can also handle the "rednet_message" event to receive messages without calling receive(), the arguments are the same as the receive() return values.
 
*You can also handle the "rednet_message" event to receive messages without calling receive(), the arguments are the same as the receive() return values.
 +
[[Category:APIs]]

Revision as of 00:01, 29 January 2012

The rednet API provides a simple computer networking model over RedPower bundled cables.

Functions for specifiying sides to be used for networking;

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

Functions for sending messages to other computers;

  • rednet.announce()
  • rednet.send( receiverID, message )
  • rednet.broadcast( message )

Functions for receiving messages:

  • rednet.receive( timeout ) -- Returns: senderID, message
  • You can also handle the "rednet_message" event to receive messages without calling receive(), the arguments are the same as the receive() return values.