-
Notifications
You must be signed in to change notification settings - Fork 26
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
Purpose of WebsocketRPCEndpoint.on_connect #39
Comments
on_connect is exposed for deriving layers that extended or build on top of the RPC channel - see https://github.com/permitio/fastapi_websocket_pubsub for example (https://github.com/permitio/fastapi_websocket_pubsub/blob/c757bd707622252aab761a59115897dd12413478/fastapi_websocket_pubsub/pub_sub_client.py#L194) |
The purpose of the I was wondering about the |
Yes, you seem to be right. |
Would you like to open a PR to fix this? :) |
I was trying out the package and I was going to inherit from
WebsocketRPCEndpoint
and overrideon_connect
.fastapi_websocket_rpc/fastapi_websocket_rpc/websocket_rpc_endpoint.py
Line 110 in d0f322e
However in my test example it's never called, and in fact, it seems like it's never referred to at any point; the handlers in the private member
_on_connect
are passed directly toRpcChannel
:fastapi_websocket_rpc/fastapi_websocket_rpc/websocket_rpc_endpoint.py
Line 85 in d0f322e
So wonder what is the purpose of
on_connect
? Is that supposed to be called externally by e.g. FastAPI? Was it supposed to be passed toregister_connect_handler
?The text was updated successfully, but these errors were encountered: