Comments (8)
Yeah this was sort of the ... "easy" mode? Do we want it to support everything? Do you have an idea how to fix? (I don't)
from tokio-io.
It could be unconditionally called, but then it would require changing the return signature of decode_eof
-> Result<Option<Item>>
or something like that.
from tokio-io.
Perhaps yeah, but I'd be wary of how the meaning of None
is then very different between decode
and decode_eof
.
from tokio-io.
from tokio-io.
It's true yeah being a default method could help quite a bit here. That means most will never implement the method itself.
Perhaps we could try itout and see how it goes? (I can't think of any other alternatives myself)
from tokio-io.
It could be unconditionally called, but then it would require changing the return signature of decode_eof -> Result<Option> or something like that.
This was the approach that I introduced in #1, motivated purely by it seeming much more obvious to me. It was reverted in cddbdb3.
from tokio-io.
from tokio-io.
To be clear, I was referring to the EOF handling, not generic errors (which are offtopic in this PR).
from tokio-io.
Related Issues (20)
- Shutdown doesn't handle `Async::NotReady` HOT 5
- ReadHalf and WriteHalf don't honor underlying T's specialization
- Doc links are broken
- build is broken with bytes 0.4.7
- Add a way to override `decode_head` in `length_delimited::{FramedRead, FramedWrite}`
- Does it make sense that tokio::codec::Decoder's decode method takes a BytesMut? HOT 3
- Clean shutdown of TCP sockets HOT 4
- Add a "Bytes" Codec Implementation HOT 1
- Decoder::decode is slow for large buffers HOT 4
- Rename `AsyncWrite::shutdown` HOT 3
- Bump iovec and bytes versions
- Consider adding `io::read_repeating` HOT 9
- Consider Removing the `io::Read` and `io::Write` supertraits on AsyncRead and AsyncWrite HOT 5
- Publish new version HOT 3
- Clarify behaviour of flush on WouldBlock error HOT 2
- FramedRead updates unusably slowly HOT 2
- 'lines_decoder' fails on 32-bit
- FreeBSD clients able to freeze a Tokio+Hyper Linux server HOT 9
- Reconsider including `length_delimited` in the tokio-io crate HOT 1
- LinesCodec repeatedly returns final line when line is not terminated with \n
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tokio-io.