ing
This commit is contained in:
parent
51bbdb4429
commit
9c0a3b06a5
|
@ -35,6 +35,12 @@ type RPCGatewayServletHandlers struct {
|
|||
gwRPCHandler rpc.GatewayRPCHandler
|
||||
}
|
||||
|
||||
func (sh *RPCGatewayServletHandlers) SocketContext(serverCTX cwf.ServerContext) cwf.SocketContext {
|
||||
socketCTX := sh.ServletHandlers.SocketContext(serverCTX)
|
||||
|
||||
return newServletContext(socketCTX)
|
||||
}
|
||||
|
||||
func (sh *RPCGatewayServletHandlers) Init(serverCTX cwf.ServerContext) error {
|
||||
if err := sh.ServletHandlers.Init(serverCTX); nil != err {
|
||||
return err
|
||||
|
@ -47,14 +53,8 @@ func (sh *RPCGatewayServletHandlers) Init(serverCTX cwf.ServerContext) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (sh *RPCGatewayServletHandlers) Handshake(serverCTX cwf.ServerContext, ctx *fasthttp.RequestCtx) (id string, extensionsHeader *fasthttp.ResponseHeader) {
|
||||
return sh.gwRPCHandler.Handshake(serverCTX, ctx)
|
||||
}
|
||||
|
||||
func (sh *RPCGatewayServletHandlers) SocketContext(serverCTX cwf.ServerContext) cwf.SocketContext {
|
||||
socketCTX := sh.ServletHandlers.SocketContext(serverCTX)
|
||||
|
||||
return newServletContext(socketCTX)
|
||||
func (sh *RPCGatewayServletHandlers) Handshake(socketCTX cwf.SocketContext, ctx *fasthttp.RequestCtx) (id string, extensionsHeader *fasthttp.ResponseHeader) {
|
||||
return sh.gwRPCHandler.Handshake(socketCTX, ctx)
|
||||
}
|
||||
|
||||
// OnConnect invoked when client is connected
|
||||
|
|
|
@ -8,7 +8,7 @@ import (
|
|||
|
||||
type GatewayRPCHandler interface {
|
||||
Init(serverCTX cwf.ServerContext) error
|
||||
Handshake(serverCTX cwf.ServerContext, ctx *fasthttp.RequestCtx) (id string, extensionsHeader *fasthttp.ResponseHeader)
|
||||
Handshake(socketCTX cwf.SocketContext, ctx *fasthttp.RequestCtx) (id string, extensionsHeader *fasthttp.ResponseHeader)
|
||||
|
||||
Validate()
|
||||
}
|
||||
|
|
|
@ -12,7 +12,7 @@ func (sh *GatewayRPCHandlers) Init(serverCTX cwf.ServerContext) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
func (sh *GatewayRPCHandlers) Handshake(serverCTX cwf.ServerContext, ctx *fasthttp.RequestCtx) (id string, extensionsHeader *fasthttp.ResponseHeader) {
|
||||
func (sh *GatewayRPCHandlers) Handshake(socketCTX cwf.SocketContext, ctx *fasthttp.RequestCtx) (id string, extensionsHeader *fasthttp.ResponseHeader) {
|
||||
return "", nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user