25 lines
399 B
Protocol Buffer
25 lines
399 B
Protocol Buffer
|
syntax = "proto3";
|
||
|
package echoserver;
|
||
|
|
||
|
import "google/api/annotations.proto";
|
||
|
|
||
|
message WSRequest {
|
||
|
string msgType = 1;
|
||
|
string userId = 2;
|
||
|
string msg = 3;
|
||
|
}
|
||
|
|
||
|
message WSResponse {
|
||
|
string msgType = 1;
|
||
|
string userId = 2;
|
||
|
string msg = 3;
|
||
|
}
|
||
|
|
||
|
service WebSocketService {
|
||
|
rpc Test(stream WSRequest) returns (stream WSResponse) {
|
||
|
option (google.api.http) = {
|
||
|
get: "/ws"
|
||
|
};
|
||
|
}
|
||
|
}
|