libp2p-hs-0.1.0.0: Haskell implementation of the libp2p networking stack
Safe HaskellNone
LanguageGHC2021

Network.LibP2P.Protocol.Identify.Message

Description

Identify protocol message encoding/decoding (protobuf).

Wire format from docs07-protocols.md and specsidentify/README.md: Field 1: publicKey (bytes, optional) Field 2: listenAddrs (repeated bytes) Field 3: protocols (repeated string) Field 4: observedAddr (bytes, optional) Field 5: protocolVersion (string, optional) Field 6: agentVersion (string, optional)

Uses proto3-wire for protobuf encoding/decoding. No length prefix; the message boundary is determined by stream closure.

Synopsis

Documentation

data IdentifyInfo Source #

Identify message payload.

Constructors

IdentifyInfo 

Fields

encodeIdentify :: IdentifyInfo -> ByteString Source #

Encode an Identify message to protobuf wire format.

decodeIdentify :: ByteString -> Either ParseError IdentifyInfo Source #

Decode an Identify message from protobuf wire format.

maxIdentifySize :: Int Source #

Maximum Identify message size: 64 KiB.