mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
update SocketUdpServer::sendTo
This commit is contained in:
parent
0c916b9991
commit
caf0ab9731
2 changed files with 31 additions and 25 deletions
|
|
@ -258,9 +258,15 @@ network.__process_events = function()
|
|||
end
|
||||
elseif etype == DATAGRAM then
|
||||
if side == ON_CLIENT then
|
||||
_udp_client_datagram_callbacks[cid](data)
|
||||
local callback = _udp_client_datagram_callbacks[cid]
|
||||
if callback then
|
||||
callback(data)
|
||||
end
|
||||
elseif side == ON_SERVER then
|
||||
_udp_server_callbacks[sid](addr, port, data)
|
||||
local callback = _udp_server_callbacks[sid]
|
||||
if callback then
|
||||
callback(addr, port, data)
|
||||
end
|
||||
end
|
||||
elseif etype == RESPONSE then
|
||||
if event[2] / 100 == 2 then
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue