ping

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2022 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Overview

addr [4]byte use big endian

addr [4]byte use big endian

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrAcces      = errors.New("Permission denied (you must be root)")
	ErrNoRun      = errors.New("ping server is not running")
	ErrEmpty      = errors.New("empty list")
	DefaultServer = NewServer(context.Background())
)

Functions

func Call

func Call(ips [][4]byte, timeout int, retry int) ([]bool, error)

func Kill

func Kill() error

func Run

func Run(rate uint32) error

func Wait added in v0.0.2

func Wait()

Types

type Server added in v0.0.2

type Server struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

func NewServer added in v0.0.2

func NewServer(ctx context.Context) *Server

func (*Server) Go added in v0.0.2

func (p *Server) Go(ips [][4]byte, timeout, retry int, done chan *Task) *Task

func (*Server) Kill added in v0.0.2

func (p *Server) Kill() error

func (*Server) Run added in v0.0.2

func (p *Server) Run(rate uint32) error

func (*Server) Wait added in v0.0.2

func (p *Server) Wait()

type Task

type Task struct {
	sync.RWMutex // for entry_list

	Timeout int64

	RetryLimit int
	Ips        [][4]byte
	Ret        []bool
	Done       chan *Task
	Error      error
	// contains filtered or unexported fields
}

func Go

func Go(ips [][4]byte, timeout, retry int, done chan *Task) *Task

Jump to

Keyboard shortcuts

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