overflow_probes/client/central/data/socket_handlers.go
crusader 94a4f3136c ing
2018-03-21 19:22:13 +09:00

27 lines
569 B
Go

package data
import (
"net/http"
"git.loafle.net/commons_go/logging"
cwfc "git.loafle.net/commons_go/websocket_fasthttp/client"
)
type SocketHandlers struct {
cwfc.SocketHandlers
}
func (sh *SocketHandlers) OnConnect(socketContext cwfc.SocketContext, res *http.Response) {
logging.Logger().Infof("Probe: client has been connected res[%v]", res)
}
func (sh *SocketHandlers) OnDisconnect(soc cwfc.Socket) {
logging.Logger().Infof("Probe: client has been disconnected soc[%v]", soc)
}
func newSocketHandler() cwfc.SocketHandler {
return &SocketHandlers{}
}