As I understand, the only purpose of the curly braces there is to allow you to specify method options, like one of the options defined here <https://github.com/google/protobuf/blob/c7457ef65a7a8584b1e3bd396c401ccf8e275ffa/src/google/protobuf/descriptor.proto#L629> or a custom option. If you don't want to set any options then you can always just terminate the statement with a semicolon and skip the braces. I guess the empty pair of braces is just a stylistic preference.
On Sat, Aug 26, 2017 at 5:49 AM, Amit Saha <[email protected]> wrote: > Hi all, > > Consider the example (from the grpc docs) service definition below: > > service Greeter { > // Sends a greeting > rpc SayHello (HelloRequest) returns (HelloReply) {} > } > > What is the {} at the end in the declaration of SayHello required for? It > seems optional, since the example in the proto3 spec ( > https://developers.google.com/protocol-buffers/docs/reference/proto3-spec) > doesn't use it. > > Thank you in advance. > > Best Wishes, > Amit. > > > > -- > You received this message because you are subscribed to the Google Groups > "Protocol Buffers" 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/protobuf. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Protocol Buffers" 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/protobuf. For more options, visit https://groups.google.com/d/optout.
