tun2socket

package module
v0.0.0-...-5db8ce5 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const BuildNativeMD5 = "dad50f04cbaa0935bd5cd1c0dcc5f8ae"

Variables

View Source
var ErrIllegalState = errors.New("illegal state")
View Source
var ErrNative = errors.New("native error")
View Source
var ErrUnacceptable = errors.New("unacceptable")
View Source
var ErrUnsupported = errors.New("unsupported")

Functions

This section is empty.

Types

type Link interface {
	Read(buf []byte) (int, error)
	Write(buf []byte) (int, error)
	Close() error
}
func NewLink(mtu int) (Link, error)

type Stack

type Stack interface {
	Link() Link
	TCP() TCP
	UDP() UDP
	Close() error
}

func NewStack

func NewStack(mtu int) (Stack, error)

type TCP

type TCP interface {
	Accept() (net.Conn, error)
	Close() error
}

func ListenTCP

func ListenTCP() (TCP, error)

type UDP

type UDP interface {
	ReadFrom(b []byte) (n int, lAddr, rAddr net.Addr, err error)
	WriteTo(b []byte, lAddr, rAddr net.Addr) (int, error)
	Close() error
}

func ListenUDP

func ListenUDP() (UDP, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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