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

Some interesting examples (may be should include some thing similar to current docs). #90

Open
goriunov opened this issue Nov 30, 2018 · 0 comments

Comments

@goriunov
Copy link

goriunov commented Nov 30, 2018

I have been searching around for some more examples about tokio and found this book it is incomplete but it gives quite a good examples which explain some abstractions.

I understood better some things about tokio when i looked in to some examples from above guide.

For instance i have checked this tutorial where it creates an incoming() method but with futures instead of the just calling incoming() from TcpListener. And after seen this example it is much clear how tokio's incoming() works on background and how i can write the same with futures.

Before that reading that part it was a bit hard to understand what tokio does and how it works with incoming part.

The same for read and write from this guide. It kind of explains quite a bit.

I think it would be very useful for beginners to see what was abstracted with tokio and how would it look without using tokio's helpers and abstractions as it will explain a lot of things.

Those docs are outdated and incomplete (would be really good to have them completed) so i needed to go to tokio's docs and find an alternative to accept() which is poll_accept() then change Async::Done((_, peer)) to Async::Ready and so on. And it is for the person who already understands somethings , where to search and what is outdated and what is not (this would be very hard for people who sees that stuff for the first time).

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

No branches or pull requests

1 participant