This repository has been archived on 2026-01-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
Game/Server/Gateway/net/ws_gateway/server.go

30 lines
634 B
Go

package ws_gateway
import (
"common/net/socket"
"time"
)
type GatewayWsServer struct {
}
func (g *GatewayWsServer) OnOpen(_ socket.ISocketConn) ([]byte, socket.Action) {
return nil, socket.None
}
func (g *GatewayWsServer) OnHandShake(conn socket.ISocketConn) {
//query := conn.GetParam("query")
}
func (g *GatewayWsServer) OnMessage(conn socket.ISocketConn, bytes []byte) socket.Action {
return socket.None
}
func (g *GatewayWsServer) OnClose(conn socket.ISocketConn, _ error) socket.Action {
return socket.None
}
func (g *GatewayWsServer) OnTick() (time.Duration, socket.Action) {
return 5 * time.Second, socket.None
}