mirror of
https://github.com/Azure/DotNetty.git
synced 2026-10-27 03:26:51 +08:00
Motivation: Ported/Re-implemented Protobuf codec support into DotNetty Modifications: - Added Protobuf 2/3 Codec project - Added Protobuf 2/3 Codec unit test project. - Extra: Ported MessageToByteEncoder to DotNetty.Codec. Result: Protobuf 2/3 codec supported by DotNetty.
27 lines
479 B
Protocol Buffer
27 lines
479 B
Protocol Buffer
syntax = "proto3";
|
|
package Google.Protobuf.Examples.AddressBook;
|
|
|
|
// [START messages]
|
|
message Person {
|
|
string name = 1;
|
|
int32 id = 2; // Unique ID number for this person.
|
|
string email = 3;
|
|
|
|
enum PhoneType {
|
|
MOBILE = 0;
|
|
HOME = 1;
|
|
WORK = 2;
|
|
}
|
|
|
|
message PhoneNumber {
|
|
string number = 1;
|
|
PhoneType type = 2;
|
|
}
|
|
|
|
repeated PhoneNumber phones = 4;
|
|
}
|
|
|
|
// Our address book file is just one of these.
|
|
message AddressBook {
|
|
repeated Person people = 1;
|
|
} |