66 end |
66 end |
67 end |
67 end |
68 |
68 |
69 function create_component(host, component) |
69 function create_component(host, component) |
70 -- TODO check for host well-formedness |
70 -- TODO check for host well-formedness |
71 session = session or { type = "component", host = host, connected = true, s2sout = {}, send = component }; |
71 local session = session or { type = "component", host = host, connected = true, s2sout = {}, send = component }; |
72 return session; |
72 return session; |
73 end |
73 end |
74 |
74 |
75 function register_component(host, component, session) |
75 function register_component(host, component, session) |
76 if not hosts[host] or (hosts[host].type == 'component' and not hosts[host].connected) then |
76 if not hosts[host] or (hosts[host].type == 'component' and not hosts[host].connected) then |