sock.lua
sock.lua copied to clipboard
Outdated docs
Hey there. First of all, thank you for this amazing lib. Honestly, it' the best I've found yet! It's really easy and intuitive. I believe the examples are a bit outdated tho!
In the hello example, one can read this piece of code:
server:on("connect", function(data, peer)
local msg = "Hello from server!"
peer:send("hello", msg)
end)
While the docs state that server on callbacks will be given data and client object, not peer object.
It might be better to adjust the examples or add a server:sendToClient(client, event, data) function so it's even easier!
Cheers! 😄🍻🎉