transmit

package module
v0.0.0-...-cdcad39 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2017 License: AGPL-3.0 Imports: 15 Imported by: 0

README

transmit

Go Report Card Badge

forward packets from one network missing connectivty with another

Documentation

Index

Constants

View Source
const (
	Size    = 26
	Padding = 512
)
View Source
const (
	Bind uint16 = iota
	Accept
	Reject
	Copy
	Abort
	Done
)

Variables

View Source
var (
	ErrEmpty     = errors.New("empty")
	ErrCorrupted = errors.New("packet corrupted")
	ErrUnknownId = errors.New("unknown packet id")
)
View Source
var ErrClosed = errors.New("closed")

Functions

func Dispatch

func Dispatch(a string) (net.Conn, error)

func Forward

func Forward(a, s string) (net.Conn, error)

func Subscribe

func Subscribe(a, n string) (net.Conn, error)

Types

type Route

type Route struct {
	Id   string `json:"id"`
	Addr string `json:"addr"`
	Eth  string `json:"ifi"`
}

type Router

type Router struct {
	net.Listener
	// contains filtered or unexported fields
}

func NewRouter

func NewRouter(a string, rs []Route) (*Router, error)

func (*Router) Accept

func (r *Router) Accept() (net.Conn, net.Conn, error)

func (*Router) Close

func (r *Router) Close() error

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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