No, each method needs to specify a response type. The workaround you suggested is the way to go. However, you may want to define your own message that is empty (rather than a generic Void that might get reused by other services) so that you can extend your message in the future.
On Wed, Feb 3, 2010 at 7:24 AM, phelyks <[email protected]> wrote: > Hi all! > > I am currently playing around with protocol buffers and now was > looking closer at the rpc code that can be generated by it. > > But I am a bit confused. I did not find a way how to create rpc > messages that do not define a reply. > is there a way to create one-way rpc calls in protocol buffers? > > An example what i would like would be that: > service myService > { > rpc Echo (EchoParam) returns (EchoReply) ; > rpc OneWayWithoutResponse(ParamsToSend); > } > > > the only workaround that i can think of would be creating a "Void" > message that is declared as the answer and the rpc implementation to > then "ignore" those. > > like this: > > message Void > { > } > > service myService > { > rpc OneWayWithoutResponse(FirmwareEvent) returns (Void); > } > > is there a way how i can avoid this workaround? > > cheers phelyks > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<protobuf%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/protobuf?hl=en. > > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/protobuf?hl=en.
