Replies: 4 comments
-
CombineGRPC will end the gRPC call when the client stream completes, and If you want a |
Beta Was this translation helpful? Give feedback.
-
Thanks for the feedback. I ended up changing the requestPublisher to a passthroughsubject that never closes and sends messages whenever the provided value changes! :) |
Beta Was this translation helpful? Give feedback.
-
@vyshane is there a process that you recommend for bidirectional streaming where the request stream can react to ui actions and then receive the responses? Do you have any examples with SwiftUI? In your examples you use publishers.sequence but I am trying to find how AnyPublisher can send messages based on UI actions. Also, I am unable to use the CurrentValueSubject courtesy send method to send values to the request stream because we are needing to conform to AnyPublisher. Do you know of any workaround so that I can publish values to the request stream over time at my choosing? |
Beta Was this translation helpful? Give feedback.
-
You should be able to use the |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi There,
I was encountering inconsistencies when calling a BiDirectional stream from the client side. I set up my request publisher as a Just to publish one value, and then I use combines AsyncStream helper method .values to wait for the response messages. However, most of the time, I never get a response back as it seems the connection closes prematurely. There are a few occurrences when the call is recieved and I am able to see the printed response. Am I setting up the request stream properly, or am I not supposed to use a Just publisher for the request stream? How do i ensure the connection is preserved without any of the streams terminating?
Beta Was this translation helpful? Give feedback.
All reactions