5Mixer / mphx

A little library to let you make multiplayer games easily with Haxe. No longer maintained and better options are available.
MIT License
125 stars 16 forks source link

Disconnect client from server #52

Open r8code opened 7 years ago

r8code commented 7 years ago

Hi, is there a way to reject or disconnect a client from the server? Sorry if I shouldn't have posted in here, I don't know where to ask question about this lib. Nice job btw

5Mixer commented 7 years ago

Here is the best place for help with the lib, sorry I haven't gotten around to commiting a fix to the repo. I'm working on a solution where calling .loseConnection on a connection drops it, but I haven't got much time to spend on mphx these days. I'll see what I can do, sorry about the lack of support :/

Edit - A good solution in the meantime might be to send a 'drop connection' event, and then handle that yourself, if the connection has already been established. That might mean that you don't reject a connection straight away, but has the advantage of being relatively stable, and you can add your own 'reason' data for why the connection should be dropped.