modulepackage
0.4.0
Repository: https://github.com/athanorlabs/go-p2p-net.git
Documentation: pkg.go.dev
# README
go-p2p-net
This library uses libp2p to create a generic p2p node with support for discovery via DHT, bootstrapping, and peer count management. It also contains utilities for messaging over streams.
# Functions
NewHost returns a new Host.
ReadStreamMessage reads the 4-byte LE size header and message body returning the message body bytes.
WriteStreamBytes writes the given bytes to the stream.
WriteStreamMessage writes the given message to the writer.
# Interfaces
Message must be implemented by all network messages.