agwpe

package
v0.11.8 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: MIT Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTNCClosed  = errors.New("TNC closed")
	ErrPortClosed = errors.New("port closed")
)
View Source
var ErrListenerClosed = errors.New("listener closed")

Functions

This section is empty.

Types

type Conn

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

func (*Conn) Close

func (c *Conn) Close() error

func (*Conn) Flush

func (c *Conn) Flush() error

Flush implements the transport.Flusher interface.

func (*Conn) LocalAddr

func (c *Conn) LocalAddr() net.Addr

func (*Conn) Read

func (c *Conn) Read(p []byte) (int, error)

func (*Conn) RemoteAddr

func (c *Conn) RemoteAddr() net.Addr

func (*Conn) SetDeadline

func (c *Conn) SetDeadline(t time.Time) error

func (*Conn) SetReadDeadline

func (c *Conn) SetReadDeadline(t time.Time) error

func (*Conn) SetWriteDeadline

func (c *Conn) SetWriteDeadline(t time.Time) error

func (*Conn) Write

func (c *Conn) Write(p []byte) (int, error)

type Listener

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

func (*Listener) Accept

func (ln *Listener) Accept() (net.Conn, error)

func (*Listener) Addr

func (ln *Listener) Addr() net.Addr

func (*Listener) Close

func (ln *Listener) Close() error

type Port

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

Port represents a registered AGWPE Port.

func (*Port) Close

func (p *Port) Close() error

func (*Port) DialContext

func (p *Port) DialContext(ctx context.Context, target string, via ...string) (net.Conn, error)

func (*Port) DialURLContext

func (p *Port) DialURLContext(ctx context.Context, url *transport.URL) (net.Conn, error)

func (*Port) Listen

func (p *Port) Listen() (net.Listener, error)

func (*Port) SendUI

func (p *Port) SendUI(data []byte, dst string) error

type TNC

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

func OpenTCP

func OpenTCP(addr string) (*TNC, error)

func (*TNC) Close

func (t *TNC) Close() error

func (*TNC) Ping

func (t *TNC) Ping() error

func (*TNC) RegisterPort

func (t *TNC) RegisterPort(port int, mycall string) (*Port, error)

func (*TNC) Version

func (t *TNC) Version() (string, error)

type TNCPort

type TNCPort struct {
	TNC
	Port
}

TNCPort representw a TNC connection with a single registered port.

func OpenPortTCP

func OpenPortTCP(addr string, port int, callsign string) (*TNCPort, error)

OpenPortTCP opens a connection to the TNC and registers a single port.

The returned TNCPort is a reference to the combined Port and TNC.

func (TNCPort) Close

func (tp TNCPort) Close() error

Close closes both the port and TNC.

Jump to

Keyboard shortcuts

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