Difference between revisions of "Rednet.open"
From ComputerCraft Wiki
Bomb Bloke (Talk | contribs) (More details.) |
|||
(One intermediate revision by one other user not shown) | |||
Line 2: | Line 2: | ||
{{Function | {{Function | ||
|name=rednet.open | |name=rednet.open | ||
− | |args=[[string (type)|string]] side ("left" | + | |args=[[string (type)|string]] side ''("left" / "right" / "front" / "back" / "bottom" / "top")'' |
|api=rednet | |api=rednet | ||
|addon=ComputerCraft | |addon=ComputerCraft | ||
− | |desc= | + | |desc=Assuming a [[modem]] is attached to the specified side, rednet.open() tells the computer that side can be used for networking. The modem will be automatically configured to start listening on two channel numbers - one which has the same value as the computer's [[Os.getComputerID|ID]], and another which is used for detecting [[rednet.broadcast|rednet broadcasts]] (65535).<br><br> |
+ | |||
+ | See also: [[Modem.open|modem.open()]] | ||
|examples= | |examples= | ||
{{Example | {{Example | ||
− | |desc=Tells the computer that | + | |desc=Tells the computer that there is a modem to its left side that can be used for networking. |
|code=rednet.open( "left" ) | |code=rednet.open( "left" ) | ||
}} | }} | ||
}} | }} | ||
+ | |||
+ | {{RednetAPIFunctions}} | ||
+ | |||
+ | [[Category:API_Functions]] |
Latest revision as of 06:33, 6 June 2014
Function rednet.open | |
Assuming a modem is attached to the specified side, rednet.open() tells the computer that side can be used for networking. The modem will be automatically configured to start listening on two channel numbers - one which has the same value as the computer's ID, and another which is used for detecting rednet broadcasts (65535). See also: modem.open() | |
Syntax | rednet.open(string side ("left" / "right" / "front" / "back" / "bottom" / "top")) |
Returns | nil |
Part of | ComputerCraft |
API | rednet |
Examples
Example | |
Tells the computer that there is a modem to its left side that can be used for networking. | |
Code |
rednet.open( "left" ) |
Rednet API Functions |
---|
rednet.open - rednet.close - rednet.send - rednet.broadcast - rednet.receive - rednet.isOpen - rednet.host - rednet.unhost - rednet.lookup |