This commit is contained in:
crusader 2017-11-28 19:17:59 +09:00
parent cf37f4cd49
commit 4e048d56b9
3 changed files with 6 additions and 6 deletions

View File

@ -8,10 +8,10 @@ import (
cwf "git.loafle.net/commons_go/websocket_fasthttp" cwf "git.loafle.net/commons_go/websocket_fasthttp"
) )
type ServletHandlers struct { type FastHTTPServletHandlers struct {
} }
func (sh *ServletHandlers) GetRequest(servletCTX rpc.ServletContext, codec protocol.ServerCodec, conn interface{}) (protocol.ServerRequestCodec, error) { func (sh *FastHTTPServletHandlers) GetRequest(servletCTX rpc.ServletContext, codec protocol.ServerCodec, conn interface{}) (protocol.ServerRequestCodec, error) {
soc := conn.(cwf.Socket) soc := conn.(cwf.Socket)
_, r, err := soc.NextReader() _, r, err := soc.NextReader()
@ -20,7 +20,7 @@ func (sh *ServletHandlers) GetRequest(servletCTX rpc.ServletContext, codec proto
return requestCodec, err return requestCodec, err
} }
func (sh *ServletHandlers) SendResponse(servletCTX rpc.ServletContext, conn interface{}, requestCodec protocol.ServerRequestCodec, result interface{}, err error) error { func (sh *FastHTTPServletHandlers) SendResponse(servletCTX rpc.ServletContext, conn interface{}, requestCodec protocol.ServerRequestCodec, result interface{}, err error) error {
soc := conn.(cwf.Socket) soc := conn.(cwf.Socket)
wc, wErr := soc.NextWriter(websocket.TextMessage) wc, wErr := soc.NextWriter(websocket.TextMessage)
@ -41,7 +41,7 @@ func (sh *ServletHandlers) SendResponse(servletCTX rpc.ServletContext, conn inte
return nil return nil
} }
func (sh *ServletHandlers) SendNotification(servletCTX rpc.ServletContext, conn interface{}, codec protocol.ServerCodec, method string, args ...interface{}) error { func (sh *FastHTTPServletHandlers) SendNotification(servletCTX rpc.ServletContext, conn interface{}, codec protocol.ServerCodec, method string, args ...interface{}) error {
soc := conn.(cwf.Socket) soc := conn.(cwf.Socket)
wc, wErr := soc.NextWriter(websocket.TextMessage) wc, wErr := soc.NextWriter(websocket.TextMessage)

View File

@ -2,6 +2,6 @@ package gateway
import "git.loafle.net/commons_go/rpc" import "git.loafle.net/commons_go/rpc"
type GatewayServletHandler interface { type ServletHandler interface {
rpc.ServletHandler rpc.ServletHandler
} }

View File

@ -4,6 +4,6 @@ import (
"git.loafle.net/commons_go/rpc" "git.loafle.net/commons_go/rpc"
) )
type GatewayServletHandlers struct { type ServletHandlers struct {
rpc.ServletHandlers rpc.ServletHandlers
} }