Skip to content
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

Changes to protocol reading and writing #16

Merged
merged 1 commit into from
Dec 27, 2019

Conversation

davidfowl
Copy link
Owner

@davidfowl davidfowl commented Dec 27, 2019

  • This change makes the ProtocolReader and ProtocolWriter non-generic and as such makes it possible to parse multipe types of messages on a per read/write basis. This is useful when there are mixed message types in a single protocol (like header and body).
  • As a result, we can no longer store the previous message to the reader has to be advanced before reading again.
  • It also allows for more advanced scenarios like reading a message then checking the state of the reader to take some action.
  • Renamed IProtocolReader to IMessageWriter and IProtocolWriter to IMessageWriter

cc @JanEggers

- This change makes the ProtocolReader and ProtocolWriter non-generic and as such makes it possible to parse multipe types of messages on a per read/write basis. This is useful when there are mixed message types in a single protocol (like header and body).
- As a result, we can no longer store the previous message to the reader has to be advanced before reading again.
- It also allows for more advanced scenarios like reading a message then checking the state of the reader to take some action.
@davidfowl davidfowl merged commit 8486701 into master Dec 27, 2019
@davidfowl davidfowl deleted the davidfowl/non-generic-protocol branch December 27, 2019 19:54
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