Streaming support.

86 views
Skip to first unread message

Amit Kumar

unread,
Jul 31, 2020, 10:57:48 AM7/31/20
to Cap'n Proto

So I had a use case where the client streams to server over gRPC. I was trying to find examples of an equivalent setup for Cap'n Proto but no luck so far.

Any ideas?

Zachary Dremann

unread,
Jul 31, 2020, 1:12:42 PM7/31/20
to Cap'n Proto
I'd look at something like the following (copied from the 0.8 announcement)

interface MyInterface {
  streamingCall @0 () -> (callback :Callback);
  interface Callback {
    sendChunk @0 (chunk :Data) -> stream;
    done @1 ();
  }
}

The client can call `streamingCall`, then call `sendChunk` repeatedly to stream items to the server, calling done when it is done.
Reply all
Reply to author
Forward
0 new messages