stream

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2019 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OPEN   uint32 = 0
	CLOSED uint32 = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Proxy added in v0.1.2

type Proxy interface {
	// Close the proxy.
	Close() error
	// Start listening for packets to send to the satellite and sending back received packets.
	Start(o *SatelliteStreamOptions) error
}

Proxy is the interface to send and receive packets.

func NewTCPProxy added in v0.1.2

func NewTCPProxy(o *TCPProxyOptions) (Proxy, error)

Create a UDPProxy.

func NewUDPProxy added in v0.1.2

func NewUDPProxy(o *UDPProxyOptions) (Proxy, error)

Create a UDPProxy.

type SatelliteStream

type SatelliteStream interface {
	Send(payload []byte) error

	io.Closer
}

func OpenSatelliteStream

func OpenSatelliteStream(o *SatelliteStreamOptions, recvChan chan<- []byte) (SatelliteStream, error)

OpenSatelliteStream opens a stream to a satellite over the StellarStation API.

type SatelliteStreamOptions added in v0.1.2

type SatelliteStreamOptions struct {
	AcceptedFraming []stellarstation.Framing
	SatelliteID     string
	IsVerbose       bool
}

type TCPProxyOptions added in v0.1.2

type TCPProxyOptions struct {
	Addr string
}

type UDPProxyOptions added in v0.1.2

type UDPProxyOptions struct {
	RecvAddr string
	SendAddr string
}

Jump to

Keyboard shortcuts

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