Skip to content

Does the client streaming happen independent of server streaming? #1131

Answered by LucioFranco
kingluo asked this question in Q&A
Discussion options

You must be logged in to vote

In the example you showed it is a stream built from an iterator there is no async work going on. You can pass in anystream you like so you could pass in the https://docs.rs/tokio-stream/latest/tokio_stream/wrappers/struct.ReceiverStream.html type and you can then use a channel to achieve the same thing go has. This implementation is much more flexible than the go one its just the example is showing a simple use case here.

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
5 replies
@kingluo
Comment options

@LucioFranco
Comment options

@kingluo
Comment options

@kingluo
Comment options

@davidpdrsn
Comment options

Answer selected by kingluo
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants