mirror of
https://github.com/kepler155c/opus
synced 2026-12-06 13:15:24 +00:00
peripheral overhaul
This commit is contained in:
1 parent
911fec9118
commit
13ec8ea04f
7 files changed
+49
-27
No files matched your search
@@ -8,8 +8,8 @@ local Socket = require('socket')
|
||||
local Util = require('util')
|
||||
|
||||
Event.addRoutine(function()
|
||||
print('peripheral: listening on port 189')
|
||||
while true do
|
||||
print('peripheral: listening on port 189')
|
||||
local socket = Socket.server(189)
|
||||
|
||||
print('peripheral: connection from ' .. socket.dhost)
|
||||
@@ -19,7 +19,9 @@ Event.addRoutine(function()
|
||||
if uri then
|
||||
local peripheral = Peripheral.lookup(uri)
|
||||
|
||||
if peripheral then
|
||||
if not peripheral then
|
||||
print('peripheral: invalid peripheral ' .. uri)
|
||||
else
|
||||
print('peripheral: proxing ' .. uri)
|
||||
local proxy = {
|
||||
methods = { }
|
||||
|
||||
Reference in new issue
Block a user