The required keyword

As the name implies, it means that both the sender and receiver of the data must handle this field, otherwise how can they communicate

Optional keyword

When protobuf handles this field, it adds a bool variable to mark whether the optional field has a value. When the sender sends the field, it marks the bool variable as true if the field has a value. Otherwise it is marked false, and the receiver will receive the bool variable sent by the sender at the same time as the field. This will tell the field whether or not it has a value. This is what option means.

This is what they call a smooth upgrade, which means nothing more than compatibility.

It’s the same way you give an array address and an array number when you pass an argument.

Repeated keyword

The sender sends the count count and the field’s initial address as an optional optional value. The sender sends the count count and the field’s initial address as an optional value. After receiving the data, the receiver parses the corresponding data according to COUNT.