transport

package
v1.1.1-0...-2151071 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2019 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTCP

func NewTCP() tcp

NewTCP returns a new tcp instance

Types

type Buffered

type Buffered struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewBuffered

func NewBuffered() *Buffered

NewVirtualTCP returns a new virtualTCP instance

func (*Buffered) Dial

func (t *Buffered) Dial(address string) (net.Conn, error)

func (*Buffered) IP

func (t *Buffered) IP(address net.Addr) net.IP

func (*Buffered) Listen

func (t *Buffered) Listen(host string, port uint16) (net.Listener, error)

func (*Buffered) Port

func (t *Buffered) Port(address net.Addr) uint16

func (*Buffered) String

func (t *Buffered) String() string

type Layer

type Layer interface {
	fmt.Stringer

	Listen(host string, port uint16) (net.Listener, error)
	Dial(address string) (net.Conn, error)

	IP(address net.Addr) net.IP
	Port(address net.Addr) uint16
}

Jump to

Keyboard shortcuts

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