lk.RemoteProcess

:findByPath (path)

local lib = {type='lk.RemoteProcess'} lib.__index = lib lk.RemoteProcess = lib

setmetatable(lib, { -- new method __call = function(lib, name, remote_service) local instance = { name = name, inlets = {}, } setmetatable(instance, lib)

if remote_service then instance:connect(remote_service) end

return instance end})

self.name = remote_service.name self.ip = remote_service.ip self.info = remote_service.info self.sub_url = remote_service.sub_url self.push = remote_service.push self.req = remote_service.req -- replace dummy 'send' self.send = function(...) remote_service.push:send(...) end self.online = true end

self.info = nil self.sub_url = nil self.push = nil self.req = nil -- dummy self.send = lib.send self.online = false end

--print('Not connected', url) -- not connected -- This method is replaced on connection end