You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
WebSocketConnection does not expose handshake path, etc. #17
I believe this requires inspecting the event h11request when the wsproto ConnectionRequested event is received.
It seems that trio-websocket takes the approach of encapsulating wsproto as an implementation detail. So to follow this we would have to wrap all the details of the request...
For now I'll make a PR to expose path as a property on WebSocketConnection, and we can consider from there.
A complication: the user handler is called prior to receiving ConnectionRequested. So with the current API, the user cannot know when the new path property will be valid.
For a simplistic API like this I suggest that the user handler only be called in the case of successful handshake.
Activity
belm0 commentedon Sep 8, 2018
I couldn't find this info anywhere within the WebSocketConnection internals, including
_wsproto(hostandresourceare both None) and_socket.belm0 commentedon Sep 9, 2018
I believe this requires inspecting the event
h11requestwhen the wsprotoConnectionRequestedevent is received.It seems that trio-websocket takes the approach of encapsulating wsproto as an implementation detail. So to follow this we would have to wrap all the details of the request...
For now I'll make a PR to expose path as a property on WebSocketConnection, and we can consider from there.
belm0 commentedon Sep 9, 2018
A complication: the user handler is called prior to receiving ConnectionRequested. So with the current API, the user cannot know when the new path property will be valid.
For a simplistic API like this I suggest that the user handler only be called in the case of successful handshake.