-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(connection): forward request+client_id to life cycle methods
Add onConnect on onClose methods to ServerProtocol and LinkProtocol onConnect(request, client_id) -> None onClose(client_id) -> None They are called when a websocket connection is established or closed. Arg request is the aiohttp HTTP request header. client_id is an opaque string that identifies the connection. onC Our use case is use an HTTP cookie in the request header to authenticate the request. getattr -> hasattr.
- Loading branch information
1 parent
faca704
commit 6c82264
Showing
2 changed files
with
52 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters