Temporary websocket

This commit is contained in:
insanity@loafle.com 2017-06-27 19:53:46 +09:00
parent b85103ef6f
commit 8ec65498f6
2 changed files with 5 additions and 7 deletions

View File

@ -6,19 +6,19 @@ import (
ws "git.loafle.net/overflow/overflow_api_service/ws" ws "git.loafle.net/overflow/overflow_api_service/ws"
"github.com/golang/glog" "github.com/golang/glog"
"github.com/grpc-ecosystem/grpc-gateway/runtime" "github.com/grpc-ecosystem/grpc-gateway/runtime"
"github.com/tmc/grpc-websocket-proxy/wsproxy"
"golang.org/x/net/context" "golang.org/x/net/context"
"google.golang.org/grpc" "google.golang.org/grpc"
"net/http"
"strings"
"github.com/tmc/grpc-websocket-proxy/wsproxy"
"log" "log"
"net" "net"
"net/http"
"strings"
) )
var ( var (
overflowEndpoint = flag.String("echo_endpoint", ":9090", "/v1/overflow/services") overflowEndpoint = flag.String("echo_endpoint", ":9090", "/v1/overflow/services")
grpcAddr = flag.String("grpcaddr", ":8001", "listen grpc addr") grpcAddr = flag.String("grpcaddr", ":8001", "listen grpc addr")
httpAddr = flag.String("addr", ":8000", "listen http addr") httpAddr = flag.String("addr", ":8000", "listen http addr")
) )
func RunGwRpc() (err error) { func RunGwRpc() (err error) {

View File

@ -7,7 +7,6 @@ import (
type Server struct{} type Server struct{}
func (s *Server) Test(srv ws.WebSocketService_TestServer) error { func (s *Server) Test(srv ws.WebSocketService_TestServer) error {
for { for {
req, err := srv.Recv() req, err := srv.Recv()
@ -27,7 +26,6 @@ func (s *Server) Test(srv ws.WebSocketService_TestServer) error {
} }
} }
func onConnection(req *ws.WSRequest) { func onConnection(req *ws.WSRequest) {
log.Println("UserID: ", req.GetUserId()) log.Println("UserID: ", req.GetUserId())
} }