tcp

package
v0.0.0-...-4b0016b Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Option

type Option func(*Options)

Option option func

func Addr

func Addr(addr string) Option

Addr addr

func HandleFunc

func HandleFunc(f func([]byte) ([]byte, error)) Option

HandleFunc handlefunc

func Max

func Max(max int) Option

Max concurrent connect

type Options

type Options struct {
	Addr string
	Max  int
	// contains filtered or unexported fields
}

Options options

type Server

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

Server tcp server

func New

func New(opts ...Option) *Server

New new tcp server

func (*Server) Init

func (s *Server) Init(opts ...Option) error

Init init

Jump to

Keyboard shortcuts

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