echoserver

package
v0.35.3 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	Type              ServerType
	BindAddr          string
	BindPort          int32
	RepeatNum         int
	SpecifiedResponse string
}

type Server

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

func New

func New(opt Options) *Server

func (*Server) Close

func (s *Server) Close() error

func (*Server) GetOptions

func (s *Server) GetOptions() Options

func (*Server) Run

func (s *Server) Run() error

type ServerType

type ServerType string
const (
	TCP  ServerType = "tcp"
	UDP  ServerType = "udp"
	Unix ServerType = "unix"
)

Jump to

Keyboard shortcuts

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