Replies: 1 comment 1 reply
-
Thank you for your feedback! The idiomatic way to produce import {AsyncSink} from "ix/asynciterable";
// AsyncSink is an AsyncIterable that you can push values to
const outgoingMessages = new AsyncSink<Message>();
// start the chat stream
const incomingMessages = chatClient.join(outgoingMessages);
// send message
outgoingMessages.send(...); Hope that helps.
Yeah, would be great to have some real-world examples! |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First, thanks a lot for this package! It really is nice to you and makes me finally want to use gRPC in a real project 😄
I did find working with streams a bit difficult, since it's very different than what I (and I'm sure many others) am used to. I've done a bunch of research into async iterables (and learned a lot!) since, but some things stil illude me. In particular, tracking a call that you've made that accepts a stream and send values to it later. Basically what this example does when a user enters something in the terminal on the client.
It would be great to have a full example with client and server that use these more novel ways of working with async events. Maybe even a remake of the example linked above.
Beta Was this translation helpful? Give feedback.
All reactions