can you add a Client:sendToAll(event, data) and Client:sendToAllBut(client, event, data)
can you add the following to make networking a bit easier Client:sendToAll(event, data) <-- sends to all clients on the server Client:sendToAllBut(client, event, data) <- sends to all clients on the server but the specified one
Hi, sorry for taking some time to respond.
I do not think I will be adding these functions, and here's why. Adding these would introduce a lot of extra complexity and potentially new vulnerabilities to the library. You need to implement custom logic on the server that decides how/when to forward messages to other clients. If a client were allowed to send messages generically to all other clients, then it essentially acts like built-in DDoS capability. So, you would end up having to write logic to prevent that, unless sock.lua handled that for you, which would add a lot of unnecessary complexity.
If you could give some more information on what you writing and what issues you are having, I'd be glad to help you out. I hope this makes sense, thanks for submitting an issue.
@camchenry isn't this already implemented?