LUBE networking not working
Posted: Wed Feb 22, 2017 1:23 am
Pretty new to networking and wanted to do some testing with LUBE. Getting no errors at all just nothing is appearing.
It's pretty simple, followed a tutorial and changed a few things to get it working (as the code was wrong on the tutorial - lol) fixed the errors yet no luck on getting it to actually print anything.
Client
Server
server conf has t.console = true, yet nothing is printing to console!
It's pretty simple, followed a tutorial and changed a few things to get it working (as the code was wrong on the tutorial - lol) fixed the errors yet no luck on getting it to actually print anything.
Client
Code: Select all
Class = require "libs.class"
require "libs.LUBE"
function onReceive(data)
end
function load()
lube.client:Init() --initialize
lube.client:setHandshake("Hi!")
lube.client:setCallback(onRecieve)
lube.client:connect("127.0.0.1", 25000)
end
function update(dt)
lube.client:update()
end
function draw()
end
function love.draw()
local version = 0.1
love.graphics.print("CLIENT - v"..version, 1, 1)
end
Code: Select all
Class = require "libs.class"
require "libs.LUBE"
function onConnect(ip, port)
print("Connection from "..ip)
love.graphics.print("Connection from "..ip)
end
function onReceive(data, ip, port)
end
function onDisconnect(ip, port)
end
function load()
lube.server:Init(25000)
lube.server:setCallback(onReceive, onConnect, onDisconnect)
lube.server:setHandshake("Hi!")
end
function update(dt)
lube.server:update(dt)
end
function love.draw()
end