overflow_probes/client/central/data/socket_handlers.go

27 lines
569 B
Go
Raw Permalink Normal View History

2017-12-08 08:31:45 +00:00
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) {
2018-03-21 10:22:13 +00:00
logging.Logger().Infof("Probe: client has been connected res[%v]", res)
2017-12-08 08:31:45 +00:00
}
func (sh *SocketHandlers) OnDisconnect(soc cwfc.Socket) {
2018-03-21 10:22:13 +00:00
logging.Logger().Infof("Probe: client has been disconnected soc[%v]", soc)
2017-12-08 08:31:45 +00:00
}
func newSocketHandler() cwfc.SocketHandler {
return &SocketHandlers{}
}