network

package
v0.0.0-...-84940ad Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2021 License: AGPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection interface {
	Send(Message) error
	Receive() (Message, error)
	Close() error
	SetError(error)
	GetError() error
}

type Dialer

type Dialer interface {
	Dial() (Connection, error)
}

type Endpoint

type Endpoint struct {
	Local         bool
	LocalAddress  string
	RemoteAddress string
	Transport     string
	Network       string
}

func NewLocalEndpoint

func NewLocalEndpoint() *Endpoint

func NewRemoteEndpoint

func NewRemoteEndpoint() *Endpoint

func (*Endpoint) WithAddress

func (e *Endpoint) WithAddress(addr string)

func (*Endpoint) WithNetwork

func (e *Endpoint) WithNetwork(network string)

func (*Endpoint) WithTransport

func (e *Endpoint) WithTransport(transport string)

type Listener

type Listener interface {
	Listen() (Connection, error)
	Stop() error
}

type Message

type Message interface {
	String() string
}

type Network

type Network interface {
	NewListener(*Endpoint) (Listener, error)
	NewDialer(*Endpoint) (Dialer, error)
}

type Preconnection

type Preconnection interface {
	Listen() (Listener, error)
	Initiate() (Connection, error)
}

Jump to

Keyboard shortcuts

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