Hi, thanks for your input. I think some of these issues, like figuring out what parameters a callback takes, would be more clear if I wrote a tutorial. I just haven't gotten to it because I'm lazy.Sulunia wrote:So, i just took this awesome library out for a spin.
One thing that i didn't know and took me some time to figure out: the server always receives an event, the data AND the peer that sent it.
So, if you want to send information specifically to a peer, you must use the peer the server receives on event trigger. It is pretty damn obvious now, but complete beginners to networking may have troubles.
I'll see if i can fix the ugly code around my simple "box moving" example with this lib and then share it here if people so wish.
Other than that, i suppose all "security" checks are done by the lib already no? So we only have to determine if the data received is valid or not to prevent cheating and so on...
Not sure if i was clear, say so if not. Otherwise, amazing library! Will definitely use it.
As far as security goes, there isn't too much going on there. It is still up to you to decide if the sent information is valid. However, I wouldn't mind adding a feature to check if an event is valid, but I'm not sure of a method that would be useful to everyone.
My advice would be to accept as little information from the client as possible, and when you do, check it. If you do accept information without checking, make sure it is something that doesn't matter. Ideally, the server should be authoritative in all matters.