質問

I was looking at using Faye for a project I've been working on since socket.io has been causing me trouble. I set up and played with some of the examples on their github and found that clients can publish straight to whatever room they are connected to. This is different behavior than what I would like. I want to limit client behavior in certain rooms to where they cannot publish at all but the server will periodically send data to the room updating them all on new information (Basically a strict subscribe behavior on certain rooms). Is this type of behavior possible with Faye or am I barking up the wrong tree?

役に立ちましたか?

解決

With CometD, you can fine tune the behaviour you want.

You have available a SecurityPolicy that allow you to control coarsely the publish authorizations, and channel Authorizers that allow you to control finely the publish authorizations (among others).

Have a read at the SecurityPolicy documentation, and at the Authorizers documentation.

The Bayeux protocol has been designed by the CometD project where you can find the latest specification.

Have also a look at the CometD tutorials, if you want to get started with CometD.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top