nicokaiser / wamp.io

An implementation of the Autobahn WebSockets RPC/PubSub: WebSocket Application Messaging Protocol (WAMP) for WebSocket.IO or Engine.IO
80 stars 19 forks source link

pub/sub? #13

Open catphive opened 11 years ago

catphive commented 11 years ago

The docs say it supports pub/sub, but doesn't give any examples of how to do it... How would the server publish or subscribe?

nicokaiser commented 11 years ago

There is an example in examples/pubsub/server.js. It simply provides a pub/sub hub which handles WAMP connections and an HTTP server. If you POST JSON messages {topicuri: ..., body: ...} to the HTTP server, they are distributed to all clients subscribed to the topic.

Sorry, there is no client example (yet?).