server

package
v0.0.0-...-bc29873 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const UnconnectedPingSize = 1 + 8 + 16 + 8 // byte + long + magic bytes (16) + long

Variables

This section is empty.

Functions

This section is empty.

Types

type Base

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

func (*Base) GetChatNames

func (b *Base) GetChatNames() []string

func (*Base) GetFormattedName

func (b *Base) GetFormattedName() string

func (*Base) GetMentionsText

func (b *Base) GetMentionsText() string

func (*Base) GetName

func (b *Base) GetName() string

func (*Base) GetOffTime

func (b *Base) GetOffTime() uint

func (*Base) GetProtocol

func (b *Base) GetProtocol() string

func (*Base) GetServerAddr

func (b *Base) GetServerAddr() string

func (*Base) GetTimeout

func (b *Base) GetTimeout() int

func (*Base) IncrementOffTime

func (b *Base) IncrementOffTime()

func (*Base) IsMarkedAsWorking

func (b *Base) IsMarkedAsWorking() bool

func (*Base) MarkIsWorking

func (b *Base) MarkIsWorking(working bool)

type HttpServer

type HttpServer struct {
	*Base
}

func (*HttpServer) CheckConnection

func (s *HttpServer) CheckConnection() (err error)

func (*HttpServer) Init

func (s *HttpServer) Init(data map[string]interface{}) error

type RaknetServer

type RaknetServer struct {
	*Base
	// contains filtered or unexported fields
}

func (*RaknetServer) CheckConnection

func (s *RaknetServer) CheckConnection() error

func (*RaknetServer) Init

func (s *RaknetServer) Init(data map[string]interface{}) error

type RconServer

type RconServer struct {
	*Base
	// contains filtered or unexported fields
}

func (*RconServer) CheckConnection

func (s *RconServer) CheckConnection() (err error)

func (*RconServer) Init

func (s *RconServer) Init(data map[string]interface{}) error

type Server

type Server interface {
	Init(data map[string]interface{}) error
	CheckConnection() error

	GetName() string
	GetServerAddr() string
	GetProtocol() string

	GetChatNames() []string

	GetTimeout() int

	GetFormattedName() string

	GetMentionsText() string

	MarkIsWorking(working bool)
	IsMarkedAsWorking() bool

	IncrementOffTime()
	GetOffTime() uint
}

func NewServer

func NewServer(config *config.ServerConfig) (Server, error)

type TcpServer

type TcpServer struct {
	*Base
}

func (*TcpServer) CheckConnection

func (s *TcpServer) CheckConnection() (err error)

func (*TcpServer) Init

func (s *TcpServer) Init(data map[string]interface{}) error

type UdpServer

type UdpServer struct {
	*Base
	// contains filtered or unexported fields
}

func (*UdpServer) CheckConnection

func (s *UdpServer) CheckConnection() (err error)

func (*UdpServer) Init

func (s *UdpServer) Init(data map[string]interface{}) error

Jump to

Keyboard shortcuts

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