transport

package
v0.0.0-...-c331985 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2023 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Ways to initialize conn with bridge protocol

General dial and listen for net

Edge protocol: connection discovery depending on network filesystem only

Packet parsing for bridge protocol

Index

Constants

View Source
const (
	CONNECT_RETRY_INTERVAL = 500 * time.Millisecond
	RENDEZVOUS_TIMEOUT     = 10 * time.Second
)

Variables

This section is empty.

Functions

func Dial

func Dial(rawurl string) (net.Conn, error)

General dial for all protocols

func DialB

func DialB(bridge, key, iface string) (conn net.Conn, err error)

Act as a dialer/subd, requesting a connection with listener/head.

func DialE

func DialE(edgeFile string) (conn net.Conn, err error)

func Listen

func Listen(rawurl string) (net.Listener, error)

General listener for all protocols

func ListenB

func ListenB(bridge, key, iface string) (net.Listener, error)

Act as a listener/head, subscribing to connection requests from dialers/subds.

func ListenE

func ListenE(edgeFile string) (net.Listener, error)

Types

type BridgeListener

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

func (*BridgeListener) Accept

func (bl *BridgeListener) Accept() (net.Conn, error)

func (*BridgeListener) Addr

func (bl *BridgeListener) Addr() net.Addr

func (*BridgeListener) Close

func (bl *BridgeListener) Close() error

type EdgeAddr

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

func (*EdgeAddr) Network

func (a *EdgeAddr) Network() string

func (*EdgeAddr) String

func (a *EdgeAddr) String() string

type EdgeListener

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

func (*EdgeListener) Accept

func (el *EdgeListener) Accept() (conn net.Conn, err error)

func (*EdgeListener) Addr

func (el *EdgeListener) Addr() net.Addr

func (*EdgeListener) Close

func (el *EdgeListener) Close() error

Close all underlying listeners and optionally remove the edge file. This has to be called at exit for edge file clean up

type Error

type Error interface {
	error
	Temporary() bool
}

Jump to

Keyboard shortcuts

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