package
1.0.0-rc.3
Repository: https://github.com/iotaledger/hive.go.git
Documentation: pkg.go.dev

# Packages

No description provided by the author
No description provided by the author

# Functions

PacketHash returns the hash of a packet.
Serve starts a new peer server using the given transport layer for communication.

# Constants

MaxPacketSize specifies the maximum allowed size of packets.
ResponseTimeout specifies the time limit after which a response must have been received.

# Variables

ErrClosed means that the server was shut down before a response could be received.
ErrInvalidMessage means that no handler could process the received message.
ErrNoMessage is returned when the package did not contain any data.
ErrTimeout is returned when an expected response was not received in time.

# Structs

Protocol provides a basis for server protocols handling incoming messages.
Server offers the functionality to start a server that handles requests and responses from peers.

# Interfaces

A Handler reacts to an incoming message.
Message extends the proto.testMessage interface with additional type.
NetConn defines the interface required for a connection.
The Sender interface specifies common method required to send requests.

# Type aliases

The HandlerFunc type is an adapter to allow the use of ordinary functions as Server handlers.
MType is the type of message type enum.