nat

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewWriteBackProxy

func NewWriteBackProxy(wb C.WriteBack) C.WriteBackProxy

Types

type Table

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

func New

func New() *Table

New return *Cache

func (*Table) AddForLocalConn

func (t *Table) AddForLocalConn(lAddr, rAddr string, conn *net.UDPConn) bool

func (*Table) Delete

func (t *Table) Delete(key string)

func (*Table) DeleteForLocalConn

func (t *Table) DeleteForLocalConn(lAddr, key string)

func (*Table) DeleteLockForLocalConn

func (t *Table) DeleteLockForLocalConn(lAddr, key string)

func (*Table) GetForLocalConn

func (t *Table) GetForLocalConn(lAddr, rAddr string) *net.UDPConn

func (*Table) GetOrCreate added in v1.18.9

func (t *Table) GetOrCreate(key string, maker func() C.PacketSender) (C.PacketSender, bool)

func (*Table) GetOrCreateLockForLocalConn

func (t *Table) GetOrCreateLockForLocalConn(lAddr, key string) (*sync.Cond, bool)

func (*Table) RangeForLocalConn

func (t *Table) RangeForLocalConn(lAddr string, f func(key string, value *net.UDPConn) bool)

Jump to

Keyboard shortcuts

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