server

package
v0.0.0-...-39b6a77 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 30, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWsServer

func NewWsServer(gatewayCfg *dto.GatewayConfig, ce cache.Provider, tcpAddr string) gnet.EventHandler

Types

type TcpServer

type TcpServer struct {
	// contains filtered or unexported fields
}

func NewTcpServer

func NewTcpServer(addr string, ce cache.Provider, gameList []string, inMsg <-chan *dto.CommonReq, outMsg chan<- *dto.CommonRes) *TcpServer

func (*TcpServer) Run

func (ts *TcpServer) Run()

Run ...

func (*TcpServer) Stop

func (ts *TcpServer) Stop()

type WsServer

type WsServer struct {
	gnet.BuiltinEventEngine
	// contains filtered or unexported fields
}

func (*WsServer) OnBoot

func (wss *WsServer) OnBoot(eng gnet.Engine) gnet.Action

func (*WsServer) OnClose

func (wss *WsServer) OnClose(c gnet.Conn, err error) (action gnet.Action)

func (*WsServer) OnOpen

func (wss *WsServer) OnOpen(c gnet.Conn) (out []byte, action gnet.Action)

func (*WsServer) OnShutdown

func (wss *WsServer) OnShutdown(eng gnet.Engine)

func (*WsServer) OnTick

func (wss *WsServer) OnTick() (delay time.Duration, action gnet.Action)

func (*WsServer) OnTraffic

func (wss *WsServer) OnTraffic(c gnet.Conn) (action gnet.Action)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL