mtcp

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: GPL-3.0 Imports: 13 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

NewAnonymousMTCPClient 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 bpv7.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

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

func (*MTCPClient) Close

func (client *MTCPClient) Close() error

func (*MTCPClient) GetPeerEndpointID

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

func (*MTCPClient) IsPermanent

func (client *MTCPClient) IsPermanent() bool

func (*MTCPClient) Send

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

func (*MTCPClient) Start

func (client *MTCPClient) Start() (err error, retry 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 bpv7.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() error

func (MTCPServer) GetEndpointID

func (serv MTCPServer) GetEndpointID() bpv7.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