Reputation: 1093
I've studied Twisted a little bit and got the hang of Protocols and Factories and Defereds. I want to have a server that will on one had handle a Pub/Sub over websockets and on the other hand be able to receive the messages that it will publish at another tcp port.
The Autobahn examples show how you make a Router and Sessions and Components but I wasn't able to find a good explanation of how these work and what their meaning is and I don't see how I can pair this Autobahn classes with a twisted factory so that I can pass the received tcp message to the Autobahn class for publishing.
Can anyone offer some pointers?
Upvotes: 0
Views: 435
Reputation: 22051
Here is an example that bridges IRC to WAMP (PubSub).
Essentially, in your TCP-whatever protocol, you need to have a reference to a WAMP session instance, and use that to bridge to WAMP.
The latter example is for WAMP v2 (the "new" thing). There are more examples for WAMP v1 - which you can look at (since the principles are the same):
Upvotes: 1