server

package
v0.0.0-...-449aa8d Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: MIT Imports: 10 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 {
	WsConns  []WsConnConfig  `yml:"ws_conns"`
	TcpConns []TcpConnConfig `yml:"tcp_conns"`
	Domain   string          `yml:"domain"`
	CertFile string          `yml:"cert_file"`
	KeyFile  string          `yml:"key_file"`
}
var DefaultConfig Config

type Server

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

func New

func New(conf *Config) *Server

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop()

type TcpConnConfig

type TcpConnConfig struct {
	ListenOn string           `yml:"listen_on"`
	For      xmppcore.ConnFor `yml:"for"`

	CertFile string `yml:"cert_file"`
	KeyFile  string `yml:"key_file"`
}

type WsConnConfig

type WsConnConfig struct {
	ListenOn     string `yml:"listen_on"`
	Path         string `yml:"path"`
	ReadBufSize  uint   `yml:"read_buf_size"`
	WriteBufSize uint   `yml:"write_buf_size"`

	CertFile string `yml:"cert_file"`
	KeyFile  string `yml:"key_file"`
}

Jump to

Keyboard shortcuts

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