15 lines
332 B
Lua
15 lines
332 B
Lua
|
local component = require("component")
|
||
|
local event = require("event")
|
||
|
local t = component.tunnel
|
||
|
print("exit - выйти")
|
||
|
while true do
|
||
|
io.write("msg: ")
|
||
|
_, message = pcall(io.read)
|
||
|
if message == "exit" then
|
||
|
break
|
||
|
end
|
||
|
t.send(message)
|
||
|
local _, _, _, _, _, message = event.pull("modem_message")
|
||
|
print(message)
|
||
|
end
|