This commit is contained in:
insanity@loafle.com
2017-06-27 19:50:49 +09:00
parent 52c933e032
commit eb7f9e67b5
5 changed files with 24 additions and 703 deletions

1
ws/cmd Normal file
View File

@@ -0,0 +1 @@
protoc -I/usr/local/include -I. -I${GOPATH}/src/github.com/grpc-ecosystem/grpc-gateway/third_party/googleapis --go_out=plugins=grpc:. --grpc-gateway_out=logtostderr=true:. echoserver/echoserver.proto

24
ws/ws.proto Normal file
View File

@@ -0,0 +1,24 @@
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"
};
}
}