Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Existing session #3

Open
VictorKozachek opened this issue Nov 9, 2017 · 1 comment
Open

Existing session #3

VictorKozachek opened this issue Nov 9, 2017 · 1 comment

Comments

@VictorKozachek
Copy link

Hi,

Tell me please, can I set up the existing WAMP session?

For instance, I have some code which connected to WAMP router and has its own session ID and I do not need to login again and I want to use the existing session.

Thanks.

@yinzara
Copy link

yinzara commented Dec 20, 2017

This is a really difficult feature to implement exactly as you've described and I think you might need to rethink your solution.

What other code is connecting to a WAMP router outside of qflow WAMP?

WAMP is a web socket based subprotocol. If you have some other code that connects to a WAMP router, it must have its own websocket code and therefore its own websocket connection. There is no way that I know of to open another web socket connection to a WAMP server and reestablish an existing session by ID. The design of the WAMP protocol says that a session ends when the connection ends and one connection is for exactly one session and one session is for exactly one connection.

For what you ask to work, somehow you would have to pass a reference to the websocket (or a method for publishing to said websocket) to the WampConnection so that it could have a reference to it as well as the session ID from your session.

What you probably want to do is pass the authentication information between the sessions and establish two separate sessions. You can do that currently using the 'User' property of WampConnection

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants