package
0.0.1
Repository: https://github.com/libonomy/libonomy-p2p.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

NewConnectionMock creates a ConnectionMock.
NewNet creates a new network.
NewNetworkMock is a mock.
NewNetworkSession creates a new network session based on provided data.
NewSessionMock creates a new mock for given public key.
NewUDPNet creates a UDPNet.
NodeAddr makes a UDPAddr from a Info struct.
Temporary checks whether the given error should be considered temporary.

# Constants

DefaultMessageQueueSize is the buffer size of each queue mentioned above.
DefaultQueueCount is the default number of messages queue we hold.
ConnectionSource values.
MessageQueueSize is the size for queue of messages before pushing them on the socket.
ReadBufferSize const is the default value used to set the socket option SO_RCVBUF.
ConnectionSource values.
TCPKeepAlive sets whether KeepAlive is active or not on the socket.
TCPKeepAlivePeriod sets the interval of KeepAlive.
WriteBufferSize const is the default value used to set the socket option SO_SNDBUF.

# Variables

ErrAlreadyClosed is an error for when `Close` is called on a closed connection.
ErrClosedIncomingChannel is sent when the connection is closed because the underlying formatter incoming channel was closed.
ErrConnectionClosed is sent when the connection is closed after Close was called.
ErrMsgExceededLimit occurs when a received message size exceeds the defined message size.
ErrTriedToSetupExistingConn occurs when handshake packet is sent twice on a connection.
IPv4LoopbackAddress is a local IPv4 loopback.

# Structs

ConnectionMock mocks connections.
ConnectionWithErr is a pair of Connection and an error occurred within the connection.
FormattedConnection is an io.Writer and an io.Closer A network connection supporting full-duplex messaging.
HandshakeData is the handshake message struct.
IncomingMessageEvent is the event reported on new incoming message, it contains the message and the Connection carrying the message.
MsgConnection is an io.Writer and an io.Closer A network connection supporting full-duplex messaging It resembles the Connection interface but suits a packet oriented socket.
Net is a connection factory able to dial remote endpoints Net clients should register all callbacks Connections may be initiated by Dial() or by remote clients connecting to the listen address It provides full duplex messaging functionality over the same tcp/ip connection Net has no channel events processing loops - clients are responsible for polling these channels and popping events from them.
NetworkMock is a mock struct.
NewConnectionEvent is a struct holding a new created connection and a node info.
ReadWriteCloserMock is a mock of ReadWriteCloserMock.
SessionMock mocks NetworkSession.
UDPMessageEvent is an event about a udp message.
UDPNet is used to listen on or send udp messages.

# Interfaces

Connection is an interface stating the API of all secured connections in the system.
ManagedConnection in an interface extending Connection with some internal methods that are required for Net to manage Connections.
NetworkSession is an authenticated network session between 2 peers.
UDPListener is the api required for listening on udp messages.

# Type aliases

ConnectionSource specifies the connection originator - local or remote node.