lua-enet
lua-enet copied to clipboard
add some server send, broadcast, channel, flag for examples.
Trying to run some example for easy understand how this code work with Love2D and Lovr. Not much docs example or explain how it works.
server.lua
for peerIndex = 1, host:peer_count() do
local peer = host:get_peer(peerIndex)
if peer then
peer:send("Hi")
end
end
It took time to dig some issues to find this. https://github.com/leafo/lua-enet/pull/19
If you have time to update some example on client and server for send, broadcast, channel and flag.