server

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

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

Go to latest
Published: Nov 13, 2023 License: GPL-3.0 Imports: 3 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 {
	Address    string `default:":6000"`
	BufferSize int    `default:"1024" split_words:"true"`
}

type Handler

type Handler interface {
	Handle(conn net.Conn, buf []byte)
}

type Server

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

func New

func New(config *Config, logger *zap.SugaredLogger, handler Handler) *Server

New returns a new Server instance

func (*Server) Run

func (s *Server) Run() error

Run starts the listener and handles incoming connections

Jump to

Keyboard shortcuts

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