Skip to content

Conversation

@om26er
Copy link
Member

@om26er om26er commented Oct 28, 2025

No description provided.

@Mahad-10 Mahad-10 force-pushed the payload-codecs branch 4 times, most recently from af8e2d3 to 54adba6 Compare October 30, 2025 15:10
@om26er om26er changed the title add initial support for payload codec add support for payload codec system Oct 30, 2025
session = connect_anonymous("ws://localhost:8080/ws", "realm1")
session.set_payload_codec(ProtobufCodec())

def event_handler(event: Event):
Copy link
Member Author

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)

Suggested change
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:
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants