-
Notifications
You must be signed in to change notification settings - Fork 4
add support for payload codec system #210
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
base: main
Are you sure you want to change the base?
Conversation
bcc6c84 to
c7216d7
Compare
af8e2d3 to
54adba6
Compare
| session = connect_anonymous("ws://localhost:8080/ws", "realm1") | ||
| session.set_payload_codec(ProtobufCodec()) | ||
|
|
||
| def event_handler(event: Event): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this func needs to handle that directly (of course the unerlying logic needs fixing)
| def event_handler(event: Event): | |
| def event_handler(create: ProfileCreate): |
xconn/codec.py
Outdated
| """Serialize a Python object to bytes.""" | ||
| raise NotImplementedError | ||
|
|
||
| def decode(self, data: bytes | str, out_type: Type[T]) -> T: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| def decode(self, data: bytes | str, out_type: Type[T]) -> T: | |
| def decode(self, data: Invocation | str, out_type: Type[T]) -> T: |
We actually need a new class that essentially has args, kwargs and details. but is "neutral" to cover Event/Invocation
2cd75f3 to
3e8dbc0
Compare
3e8dbc0 to
9aa1377
Compare
No description provided.