Why does proto3 not support constants?

98 views
Skip to first unread message

Konishi Aaron

unread,
Dec 27, 2023, 9:07:07 PM12/27/23
to Protocol Buffers
Hi everyone, even we can define a message in proto:

message test {
  string str = 1;
}

But both sides of the message sending and receiving have some special meanings for the value of the 'str',such as "system", "handshake", etc.

How can we define these constant data int 'proto3', so both sides can use '*.proto' file instead of oral agreement.

In my opinion, constants are also a part of message definition.
Reply all
Reply to author
Forward
0 new messages