SumService.proto 493 Bytes
Newer Older
Michele Fiori's avatar
Michele Fiori committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
syntax = "proto3";
package SumServiceGRPC;

message SimpleSumRequest {
    int32 a = 1;
    int32 b = 2;
}

message RepeatedSumRequest {
    int32 n = 1;
    int32 t = 2;
}

message SumServiceResponse {
    int32 res = 1;
}

service SumService {
    rpc simpleSum(SimpleSumRequest) returns (SumServiceResponse);
    rpc repeatedSum(RepeatedSumRequest) returns (stream SumServiceResponse);
    rpc streamSum(stream SimpleSumRequest) returns (stream SumServiceResponse);
}