connect

package
v0.0.0-...-493974b Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KILOBYTE = 1024
	MEGABYTE = 1024 * 1024
	GIGABYTE = 1024 * 1024 * 1024
)
View Source
const BASECHUNK = 340
View Source
const CLICHUNK = 4096
View Source
const COPTIONSEP = ":"
View Source
const ICMPCHUNK = 128
View Source
const ICMPPKT = 1500 - 20 - 8
View Source
const TCPCHUNK = 1320
View Source
const UDPCHUNK = 384

Variables

View Source
var Connectors = map[string]Connector{}

Functions

func ParseAddress

func ParseAddress(address string) (net.IP, int, error)

func Register

func Register(connector Connector) error

Types

type Connector

type Connector interface {
	Name() string
	Description() string
	Stats() *ConnectorStats
	Connect(listen, plain bool, address string) (Connector, error)
	Close()
	Read() ([]byte, int, error)
	Write(buf []byte, length int) (int, error)
}

func MakeConnect

func MakeConnect(cnameopt string, listen, plain bool) (Connector, error)

func NewConsoleConnector

func NewConsoleConnector() Connector

func NewDnsConnector

func NewDnsConnector() Connector

func NewIcmpConnector

func NewIcmpConnector() Connector

func NewTcpConnector

func NewTcpConnector() Connector

func NewUdpConnector

func NewUdpConnector() Connector

type ConnectorStats

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

func (*ConnectorStats) Recv

func (cs *ConnectorStats) Recv() int

func (*ConnectorStats) Send

func (cs *ConnectorStats) Send() int

func (*ConnectorStats) String

func (cs *ConnectorStats) String() string

Directories

Path Synopsis
proto
dns

Jump to

Keyboard shortcuts

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