I think the server -> client communication is broken (tcp). client -> server communication work as well, but server -> client doesn't work for me. The self.callback.recv function will not be executed. I have tested it with no rcpt (msg to all clients) and with rcpt (clientid).
I have a 'crappy workaround', but yeah ... I don't think this workaround is good (workaround is not for udp, don't know if the bug is on the udpClient too).
I changed the client:update(dt) function from LUBE.lua to this one:
function client:update(dt)
if not self.connected then return end
assert(dt, "Update needs a dt!")
-- First, let's handle ping messages.
if self.ping then
self.ping.timer = self.ping.timer + dt
if self.ping.timer > self.ping.time then
self:_send(self.ping.msg)
self.ping.timer = 0
end
end
-- If a recv callback is set, let's grab
-- all incoming messages. If not, leave
-- them in the queue.
if self.callbacks.recv then
local _nil, _timeout, data = self:_receive()
while data ~= nil and data ~= '' do
self.callbacks.recv(data)
_nil, _timeout, data = self:_receive()
end
end
end
Hi.
I think the server -> client communication is broken (tcp). client -> server communication work as well, but server -> client doesn't work for me. The self.callback.recv function will not be executed. I have tested it with no rcpt (msg to all clients) and with rcpt (clientid).
I have a 'crappy workaround', but yeah ... I don't think this workaround is good (workaround is not for udp, don't know if the bug is on the udpClient too).
I changed the client:update(dt) function from LUBE.lua to this one: