Temporary websocket
This commit is contained in:
parent
b85103ef6f
commit
8ec65498f6
@ -6,13 +6,13 @@ 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 (
|
||||||
|
@ -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())
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user