mtcp

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2019 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package mtcp provides a library for the Minimal TCP Convergence-Layer Protocol as defined in draft-ietf-dtn-mtcpcl-01

Because of the unidirectional design of MTCP, both MTPCServer and MTCPClient exists. The MTPCServer implements the ConvergenceReceiver and the MTCPClient the ConvergenceSender interfaces defined in the parent cla package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MTCPClient

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

MTCPClient is an implementation of a Minimal TCP Convergence-Layer client which connects to a MTCP server to send bundles. This struct implements a ConvergenceSender.

func NewAnonymousMTCPClient

func NewAnonymousMTCPClient(address string, permanent bool) *MTCPClient

NewMTCPClient creates a new MTCPClient, connected to the given address. The permanent flag indicates if this MTCPClient should never be removed from the core.

func NewMTCPClient

func NewMTCPClient(address string, peer bundle.EndpointID, permanent bool) *MTCPClient

NewMTCPClient creates a new MTCPClient, connected to the given address for the registered endpoint ID. The permanent flag indicates if this MTCPClient should never be removed from the core.

func (*MTCPClient) Address

func (client *MTCPClient) Address() string

func (*MTCPClient) Channel added in v0.2.0

func (client *MTCPClient) Channel() chan cla.ConvergenceStatus

func (*MTCPClient) Close

func (client *MTCPClient) Close()

func (*MTCPClient) GetPeerEndpointID

func (client *MTCPClient) GetPeerEndpointID() bundle.EndpointID

func (*MTCPClient) IsPermanent

func (client *MTCPClient) IsPermanent() bool

func (*MTCPClient) Send

func (client *MTCPClient) Send(bndl *bundle.Bundle) (err error)

func (*MTCPClient) Start

func (client *MTCPClient) Start() (error, bool)

func (*MTCPClient) String

func (client *MTCPClient) String() string

type MTCPServer

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

MTCPServer is an implementation of a Minimal TCP Convergence-Layer server which accepts bundles from multiple connections and forwards them to the given channel. This struct implements a ConvergenceReceiver.

func NewMTCPServer

func NewMTCPServer(listenAddress string, endpointID bundle.EndpointID, permanent bool) *MTCPServer

NewMTCPServer creates a new MTCPServer for the given listen address. The permanent flag indicates if this MTCPServer should never be removed from the core.

func (MTCPServer) Address

func (serv MTCPServer) Address() string

func (*MTCPServer) Channel

func (serv *MTCPServer) Channel() chan cla.ConvergenceStatus

func (*MTCPServer) Close

func (serv *MTCPServer) Close()

func (MTCPServer) GetEndpointID

func (serv MTCPServer) GetEndpointID() bundle.EndpointID

func (MTCPServer) IsPermanent

func (serv MTCPServer) IsPermanent() bool

func (*MTCPServer) Start

func (serv *MTCPServer) Start() (error, bool)

func (MTCPServer) String

func (serv MTCPServer) String() string

Jump to

Keyboard shortcuts

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