server

package
v0.0.0-...-3ac6c23 Latest Latest
Warning

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

Go to latest
Published: Dec 26, 2022 License: MIT Imports: 11 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 {
	Addr                string
	ConcurrentConnLimit int
	HandlerPool         workerpool.Config
}

type Handler

type Handler func(conn net.Conn) error

func ConnCloser

func ConnCloser(h Handler) Handler

type TCPServer

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

func NewTCPServer

func NewTCPServer(cfg Config) *TCPServer

func (*TCPServer) Serve

func (s *TCPServer) Serve(ctx context.Context, handler Handler)

Jump to

Keyboard shortcuts

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