mirror of
https://github.com/kepler155c/opus
synced 2025-01-16 18:32:52 +00:00
phase out peripheral.lookup
This commit is contained in:
parent
a9d03b06e9
commit
6f7e27827e
@ -12,7 +12,7 @@ function Proxy.create(remoteId, uri)
|
||||
socket.co = coroutine.running()
|
||||
|
||||
socket:write(uri)
|
||||
local methods = socket:read() or error('Timed out')
|
||||
local methods = socket:read(2) or error('Timed out')
|
||||
|
||||
local hijack = { }
|
||||
for _,method in pairs(methods) do
|
||||
|
@ -6,7 +6,6 @@ local Util = require('util')
|
||||
|
||||
local colors = _G.colors
|
||||
local device = _G.device
|
||||
local multishell = _ENV.multishell
|
||||
local network = _G.network
|
||||
local os = _G.os
|
||||
local shell = _ENV.shell
|
||||
@ -178,19 +177,10 @@ function page:eventHandler(event)
|
||||
local t = self.grid:getSelected()
|
||||
if t then
|
||||
if event.type == 'telnet' then
|
||||
multishell.openTab({
|
||||
path = 'sys/apps/telnet.lua',
|
||||
focused = true,
|
||||
args = { t.id },
|
||||
title = t.label,
|
||||
})
|
||||
shell.openForegroundTab('telnet ' .. t.id)
|
||||
|
||||
elseif event.type == 'vnc' then
|
||||
multishell.openTab({
|
||||
path = 'sys/apps/vnc.lua',
|
||||
focused = true,
|
||||
args = { t.id },
|
||||
title = t.label,
|
||||
})
|
||||
shell.openForegroundTab('vnc.lua ' .. t.id)
|
||||
os.queueEvent('overview_shortcut', {
|
||||
title = t.label,
|
||||
category = "VNC",
|
||||
@ -199,6 +189,7 @@ function page:eventHandler(event)
|
||||
\031e\\/\031 \0319c",
|
||||
run = "vnc.lua " .. t.id,
|
||||
})
|
||||
|
||||
elseif event.type == 'clear' then
|
||||
Util.clear(network)
|
||||
page.grid:update()
|
||||
|
@ -11,6 +11,7 @@ local function getProxy(path)
|
||||
break
|
||||
end
|
||||
end
|
||||
return proxy
|
||||
end
|
||||
|
||||
Event.addRoutine(function()
|
||||
@ -27,6 +28,7 @@ Event.addRoutine(function()
|
||||
|
||||
if not api then
|
||||
print('proxy: invalid API')
|
||||
socket:close()
|
||||
return
|
||||
end
|
||||
|
||||
@ -52,6 +54,7 @@ Event.addRoutine(function()
|
||||
_G.printError(m)
|
||||
end
|
||||
end
|
||||
socket:close()
|
||||
end)
|
||||
end
|
||||
end)
|
||||
|
Loading…
Reference in New Issue
Block a user