netx

package
v0.0.0-...-d00ae73 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2021 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(dst, src network.IRequest) (written int64, err error)

func DuplexCopyTcp

func DuplexCopyTcp(left, right network.IRequest) (up, down int64, err error)

DuplexCopyTcp will return 3 result up means left connection to right connection transfer data count down means right connection to left connections transfer data count and the last result is error

Types

type NatMap

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

Packet NAT table

func NewNatMap

func NewNatMap(timeout time.Duration) *NatMap

func (*NatMap) Add

func (m *NatMap) Add(peer net.Addr, dst, src net.PacketConn)

func (*NatMap) Del

func (m *NatMap) Del(key string) net.PacketConn

func (*NatMap) Get

func (m *NatMap) Get(key string) net.PacketConn

func (*NatMap) Set

func (m *NatMap) Set(key string, pc net.PacketConn)

Jump to

Keyboard shortcuts

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