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

FR: Improvements to session manager #103

Open
DrMarcII opened this issue Aug 23, 2019 · 1 comment
Open

FR: Improvements to session manager #103

DrMarcII opened this issue Aug 23, 2019 · 1 comment

Comments

@DrMarcII
Copy link

I am trying to use the session manager in a context where I want to attach to all existing targets, and then attach to and get messages about detaching from all targets as they are created/destroyed. I have something mostly working, but it is more complex and fragile than I would prefer:

  1. Support enabling https://chromedevtools.github.io/devtools-protocol/tot/Target#method-setAutoAttach. Since there is no way to get rpcc.Conn or cdp.Client for an already attached session, it is difficult to interact with an auto attached session.

  2. Provide access to the current sessionID for an rpcc.Conn or cdp.Client. targetId is deprecated in https://chromedevtools.github.io/devtools-protocol/tot/Target#event-detachedFromTarget, but there is currently no ready way to identify the sessionId for an rpcc.Conn or cdp.Client (it currently can be done by creating a map of sessionId to targetId when attachedToTarget events are fired, except in for the initial client).

@mafredri
Copy link
Owner

Thanks for raising this issue, I'll need to give it some thought as to how this could be accomplished but it's a good feature request. In the first design of sessions I played around with auto attaching but ended up omitting it to keep it simpler.

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

No branches or pull requests

2 participants