Skip to content

Conversation

avlo
Copy link
Collaborator

@avlo avlo commented Jun 2, 2024

BaseMessageDecoder is now a delegate, with its previous explicit decision-tree logic refactored per message type, moved directly into one of the following classes:

CanonicalAuthenticationMessage
RelayAuthenticationMessage
CloseMessage
EoseMessage
EventMessage
NoticeMessage
OkMessage
ReqMessage
GenericMessage

BaseMessageEncoder no longer necessary since each message class directly now knows how to encode itself.

in other words, each class above now implements its own encode() and decode() methods, enabling polymorphic encoder/decoder behavior across all BaseMessage types.

thanks @tcheeric for repo push permission. @guilhermegps /others welcome to comment/suggest/deliberate etc on this PR otherwise will merge in ~48hours (Tuesday, June 4, 2024 05:00 PM UTC.)

@avlo avlo changed the title Encoder & Decoder refactor BaseMessageEncoder & BaseMessageDecoder refactor Jun 2, 2024
@avlo avlo merged commit a110d74 into tcheeric:develop Jun 4, 2024
@avlo avlo deleted the encoder_decoder-refactor branch June 13, 2024 17:49
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.

1 participant