I looked into this a little further. I don’t quite understand Tobias’ response. I looked at the code on GitHub and it seems to very explicitly disallow a path component in the URI during initialization.
But it is confusing because the documentation for setSessionParameters doesn’t mention path, e.g.
:param url: WebSocket listening URL - ("ws:" | "wss:") "//" host [ ":" port ].
But the documentation for WebSocketServerFactory implies path is allowed, e.g.
:param url: WebSocket listening URL - ("ws:" | "wss:") "//" host [ ":" port ] path [ "?" query ].
Since the url is passed directly from the WebSocketServerFactory constructor to the setSessionParameters, it seems like the documentation should be updated so it is consistent.
But I guess the answer to my original question is, that you cannot disambiguate protocols using a path. So any other suggestions on how to support multiple protocols on a single port? (and by protocols, I mean WebSocketServerProtocols).
On Monday, March 25, 2013 6:02:04 PM UTC-4, Michael Tiller wrote:
I actually had the same question as the original poster and I don’t quite understand the responses.
The question is…is this possible? If it is, then why is there an error message (the OP gets the same one I do). If it isn’t, why not?
Ultimately, what I’m trying to do is to support more than one protocol on a single port. I thought this would be a reasonable way to do it (i.e. associate different paths with different protocols). If there is another way, please let me know. Keep in mind, I’m not interested in WAMP or RPC functionality. I’d like to stick with just basic WebSocket stuff.
On Wednesday, February 6, 2013 5:11:09 AM UTC-5, Tobias Oberstein wrote:
Am 06.02.2013 01:07, schrieb Karlo L.:
Here is part of my code:
factory = WebSocketServerFactory("ws://localhost:8080/test",
debug = False)
I don’t think you can do that - and what would be the use case? You can
specify endpoint paths using registerForRpc method.
Well, you can. The URI provided is parsed to automatically determine the
port, hostname, WS subpath the server will listen on
You received this message because you are subscribed to the Google
Groups “Autobahn” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to autobahnws+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.