transport

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2019 License: MIT Imports: 6 Imported by: 1

Documentation

Overview

Package transport contains transport related logic for MVDS.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChannelTransport added in v0.0.13

type ChannelTransport struct {
	sync.Mutex
	// contains filtered or unexported fields
}

ChannelTransport implements a basic MVDS transport using channels for basic testing purposes.

func NewChannelTransport added in v0.0.13

func NewChannelTransport(offline int, in <-chan Packet) *ChannelTransport

func (*ChannelTransport) AddOutput added in v0.0.13

func (t *ChannelTransport) AddOutput(id state.PeerID, c chan<- Packet)

func (*ChannelTransport) Send added in v0.0.13

func (t *ChannelTransport) Send(group state.GroupID, sender state.PeerID, peer state.PeerID, payload protobuf.Payload) error

func (*ChannelTransport) Watch added in v0.0.13

func (t *ChannelTransport) Watch() Packet

type Packet

type Packet struct {
	Group   state.GroupID
	Sender  state.PeerID
	Payload protobuf.Payload
}

type Transport

type Transport interface {
	Watch() Packet
	Send(group state.GroupID, sender state.PeerID, peer state.PeerID, payload protobuf.Payload) error
}

Transport defines an interface allowing for agnostic transport implementations.

Jump to

Keyboard shortcuts

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