server

package
v0.0.0-...-1f02a16 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2025 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Port    string
	Storage *storage.Storage
	Parser  *commands.Parser
}

func NewConfig

func NewConfig(port string) *Config

type GnetServer

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

func NewGnetServer

func NewGnetServer(config *Config) *GnetServer

func (*GnetServer) OnBoot

func (s *GnetServer) OnBoot(engine gnet.Engine) gnet.Action

func (*GnetServer) OnClose

func (s *GnetServer) OnClose(c gnet.Conn, err error) gnet.Action

func (*GnetServer) OnOpen

func (s *GnetServer) OnOpen(c gnet.Conn) ([]byte, gnet.Action)

func (*GnetServer) OnTraffic

func (s *GnetServer) OnTraffic(c gnet.Conn) gnet.Action

func (*GnetServer) Start

func (s *GnetServer) Start() error

func (*GnetServer) Stop

func (s *GnetServer) Stop() error

type Handler

type Handler interface {
	Start() error
	Stop() error
}

type StandardServer

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

func NewStandardServer

func NewStandardServer(config *Config) *StandardServer

func (*StandardServer) Start

func (s *StandardServer) Start() error

func (*StandardServer) Stop

func (s *StandardServer) Stop() error

Jump to

Keyboard shortcuts

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