Flotype / now

NowJS makes it easy to build real-time web apps using JavaScript
http://www.nowjs.com
MIT License
1.91k stars 175 forks source link

how do i refuse a connection attempt? #106

Closed dasantonym closed 13 years ago

dasantonym commented 13 years ago

maybe i am just too blind to see it, butif i want to validate some parameters on the "connect" event and then decide i need to drop the user's connection, how do i do that?

thanks!

ericz commented 13 years ago

Hi anton,

There is no low level way to authorize/reject connections. Perhaps a feature we can add is to allow the server to forcibly disconnect a user?

tommedema commented 13 years ago

Indeed a feature that needs to be addressed, should be as simple as io.disconnect(client)

dasantonym commented 13 years ago

thanks for the quick feedback!

so at least i know that i wasn't just too stupid to see it. this would sure be a nice feature for future releases, but for now i will just do it putting all the "good" users in a group and do all communication exclusively within that group. so at least i can now decide who gets put in that group and all other users will remain connected but won't be part of the action.

this will do for now but some form of access control would be a nice addition.

otherwise thanks for this great library, it's a pleasure to work with it!

cheers, anton