implement

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package implement provides simple wrapper of anping.AnPinger

Index

Constants

View Source
const Protocol = "Unknown"

Variables

This section is empty.

Functions

func New

func New(logWriter io.Writer) anping.AnPinger

Types

type AnPingerWrapper

type AnPingerWrapper struct {
	Opt *anping.Options
	Sta *statistics.Statistics
	// contains filtered or unexported fields
}

AnPingerWrapper is a simple wrapper of anping.AnPinger. It does nothing when running.

func (*AnPingerWrapper) Address added in v0.3.0

func (a *AnPingerWrapper) Address() M.Socksaddr

func (*AnPingerWrapper) OnFinish

func (a *AnPingerWrapper) OnFinish()

func (*AnPingerWrapper) OnLost

func (a *AnPingerWrapper) OnLost(errMsg ...any)

func (*AnPingerWrapper) OnRecv

func (a *AnPingerWrapper) OnRecv(t time.Duration)

func (*AnPingerWrapper) OnStart

func (a *AnPingerWrapper) OnStart()

func (*AnPingerWrapper) Options

func (a *AnPingerWrapper) Options() *anping.Options

func (*AnPingerWrapper) Protocol

func (a *AnPingerWrapper) Protocol() string

func (*AnPingerWrapper) ResetStatistics added in v0.3.0

func (a *AnPingerWrapper) ResetStatistics()

func (*AnPingerWrapper) SetAddress

func (a *AnPingerWrapper) SetAddress(address M.Socksaddr) error

func (*AnPingerWrapper) SetLogger

func (a *AnPingerWrapper) SetLogger(logger statistics.Logger)

func (*AnPingerWrapper) Start added in v0.3.0

func (a *AnPingerWrapper) Start(ctx context.Context) <-chan struct{}

func (*AnPingerWrapper) Statistics added in v0.3.0

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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