Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
586 B
1
Indexable
Never
syntax = "proto3";

package mes_grpc;

import "google/protobuf/timestamp.proto";
import "google/protobuf/empty.proto";

message SendRequest {
    optional string author = 1;
    optional string text = 2;
}

message SendResponse {
    optional google.protobuf.Timestamp sendTime = 1;
}

message ReadResponce {
    optional string author = 1;
    optional string text = 2;
    optional google.protobuf.Timestamp sendTime = 3;
}

service MessengerServer {
    rpc SendMessage(SendRequest) returns (SendResponse);
    rpc ReadMessages(google.protobuf.Empty) returns (stream ReadResponce);
}