stackabletech / stackabletech/tokio-zookeeper
[Suggestion] Use tokio_codec
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 78
- Forks
- 22
- PR merge metrics
- No merged PRs in 30d
Description
I was looking for an example of how to make a reusable tcp client with Tokio, and this seems to be the only example in the wild that I can actually find, so thank you. This will hopefully be helpful for my own project.
I was wondering why you do not use tokio_codec to handle the bytes serialization/deserialization. I think it might be easier to read if you use the Encoder/Decoder traits to separate those concerns into their own instead of mixing them into polling.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
No file or test is named in the issue. Start by locating the TCP client's polling code and its byte serialization/deserialization, then review how tokio_codec's Encoder and Decoder traits could separate those concerns. Done means the client uses that separation without mixing serialization logic into polling.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- networking
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100