@@ -59,25 +59,50 @@ service ZorumsService {
59
59
option (gorums.quorumcall ) = true ;
60
60
}
61
61
62
- // Multiparty with QuorumCall.
63
- rpc Multiparty (Request ) returns (Response ) {
62
+ // QuorumCall with broadcast option enables the server handler to broadcast.
63
+ // The handler still works like a regular QuorumCall from the client's
64
+ // perpective.
65
+ rpc QuorumCallWithBroadcast (Request ) returns (Response ) {
64
66
option (gorums.quorumcall ) = true ;
65
67
option (gorums.broadcast ) = true ;
66
68
}
67
69
68
- // Multiparty, internal handler.
69
- rpc MultipartyInternal (Request ) returns (google .protobuf .Empty ) {
70
+ // An rpc method with only the broadcast option specified will create a
71
+ // server handler which can be used to broadcast. The handler will not
72
+ // be exposed to the client, only to server. Hence, it is named internal.
73
+ rpc BroadcastInternal (Request ) returns (google .protobuf .Empty ) {
70
74
option (gorums.broadcast ) = true ;
71
75
}
72
76
73
- // Multiparty, send to client handler.
74
- rpc MultipartyClientHandler (Request ) returns (Response ) {
75
- option (gorums.broadcastrequest ) = true ;
77
+ // The BroadcastCall is similar to a QuorumCall, but it enables the servers
78
+ // to send the response to a client-side server handler. I.e. the client
79
+ // needs to register a client-side server and register it.
80
+ //
81
+ // NOTE: this will NOT create a broadcast method, meaning servers cannot
82
+ // call this method (only clients)
83
+ rpc BroadcastWithClientHandler1 (Request ) returns (Response ) {
84
+ option (gorums.broadcastcall ) = true ;
76
85
}
77
86
78
- // Multiparty, send to client handler.
79
- rpc MultipartyClientHandler2 (Request ) returns (ClientResponse ) {
80
- option (gorums.broadcastrequest ) = true ;
87
+ // The BroadcastCall is similar to a QuorumCall, but it enables the servers
88
+ // to send the response to a client-side server handler. I.e. the client
89
+ // needs to register a client-side server and register it.
90
+ //
91
+ // NOTE: this will NOT create a broadcast method, meaning servers cannot
92
+ // call this method (only clients)
93
+ rpc BroadcastWithClientHandler2 (Request ) returns (ClientResponse ) {
94
+ option (gorums.broadcastcall ) = true ;
95
+ }
96
+
97
+ // The BroadcastCall is similar to a QuorumCall, but it enables the servers
98
+ // to send the response to a client-side server handler. I.e. the client
99
+ // needs to register a client-side server and register it.
100
+ //
101
+ // NOTE: this WILL create a broadcast method, meaning servers (and clients)
102
+ // can call this method
103
+ rpc BroadcastWithClientHandlerAndBroadcastOption (Request ) returns (ClientResponse ) {
104
+ option (gorums.broadcastcall ) = true ;
105
+ option (gorums.broadcast ) = true ;
81
106
}
82
107
83
108
// ------------------------------------------------------------------
0 commit comments