modem.closeAll

From ComputerCraft
⧼vector-jumptonavigation⧽ ⧼vector-jumptosearch⧽

modem.closeAll
Function
Syntax
modem.closeAll()
Returns nil
API modem
Source CC:Tweaked (source)

Closes all channels on a modem. A channel must be open to receive messages on it. A modem can only have 128 channels open at the same time.

ExampleExampleClose all channels
Close all channels.
Code
local modem = peripheral.find("modem")
modem.closeAll()