Fixed small issues
This commit is contained in:
6
core.lua
6
core.lua
@@ -8,7 +8,7 @@ function Core:new()
|
||||
end
|
||||
|
||||
function Core:connect()
|
||||
ws, err = assert(http.websocket("ws://localhost:8080"));
|
||||
ws, err = assert(http.websocket("ws://192.168.5.162:8080"));
|
||||
|
||||
if not ws then
|
||||
term.setTextColor(colors.red);
|
||||
@@ -28,7 +28,7 @@ function Core:send(package)
|
||||
return false, "Websocket not initiated";
|
||||
end
|
||||
|
||||
self.ws:send(textutils.serialiseJSON(package));
|
||||
self.ws.send(textutils.serialiseJSON(package));
|
||||
end
|
||||
|
||||
function Core:read()
|
||||
@@ -36,7 +36,7 @@ function Core:read()
|
||||
return false, "Websocket not initiated";
|
||||
end
|
||||
|
||||
return true, textutils.unserialiseJSON(self.ws:read())
|
||||
return true, textutils.unserialiseJSON(self.ws.read())
|
||||
end
|
||||
|
||||
function Core:download(file)
|
||||
|
||||
Reference in New Issue
Block a user