This commit is contained in:
crusader
2017-11-29 20:46:56 +09:00
parent 7b033878f0
commit 258d739f17
7 changed files with 43 additions and 43 deletions

View File

@@ -1,6 +1,7 @@
package server
import (
cwf "git.loafle.net/commons_go/websocket_fasthttp"
oogws "git.loafle.net/overflow/overflow_gateway_websocket/server"
"github.com/valyala/fasthttp"
)
@@ -17,16 +18,16 @@ type ServerHandlers struct {
// Init invoked before the server is started
// If you override ths method, must call
func (sh *ServerHandlers) Init() error {
if err := sh.ServerHandler.Init(); nil != err {
func (sh *ServerHandlers) Init(serverCTX cwf.ServerContext) error {
if err := sh.ServerHandler.Init(serverCTX); nil != err {
return err
}
return nil
}
func (sh *ServerHandlers) OnStart() {
sh.ServerHandler.OnStart()
func (sh *ServerHandlers) OnStart(serverCTX cwf.ServerContext) {
sh.ServerHandler.OnStart(serverCTX)
}
@@ -41,9 +42,9 @@ func (sh *ServerHandlers) CheckOrigin(ctx *fasthttp.RequestCtx) bool {
return true
}
func (sh *ServerHandlers) OnStop() {
func (sh *ServerHandlers) OnStop(serverCTX cwf.ServerContext) {
sh.ServerHandler.OnStop()
sh.ServerHandler.OnStop(serverCTX)
}
func (sh *ServerHandlers) Validate() {