lua-enet icon indicating copy to clipboard operation
lua-enet copied to clipboard

add some server send, broadcast, channel, flag for examples.

Open Lightnet opened this issue 1 year ago • 0 comments

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.

Lightnet avatar Apr 22 '24 21:04 Lightnet