Why not using a streaming call <https://grpc.io/docs/guides/concepts.html#client-streaming-rpc>? Your usecase would fit perfectly with its semantics. Have a look at the relevant sections of the guide <https://grpc.io/docs/tutorials/basic/c.html>.
On Tuesday, 1 August 2017 16:21:12 UTC-7, [email protected] wrote: > > Hi Grpc exports, > > We have a client-server project, where client (C++) needs to send a lot of > data to server every a few seconds. Often there are 60000 records ready to > be sent to server per round , each record about 400-byte. So we decide to > do pagination (chunking): 1 page has 1000 records. MY question is: > > > 1.how to do paging, without close/open stream channel every time > it seems after writer->WritesDoen() and Finish(), the channel is > closed, so I have to reopen the same channel immediately for the 2nd page. > But If I don't call writer->WritesDone and Finish(), this page is not > sent. I really want send every page with the same writer, and not close the > channel in between. > > 1. keep the channel open forever: > Since the client is sending data as long as it is alive, to the same > server/port, is there a way to keep the sync channel open for sending, for > as long as the client process is alive, maybe for a few days/months... > > > thanks! > Qian > > -- You received this message because you are subscribed to the Google Groups "grpc.io" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/grpc-io. To view this discussion on the web visit https://groups.google.com/d/msgid/grpc-io/b3ac1ec1-eba0-4374-8da5-71c241e7cefc%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
