Documentation ¶
Index ¶
Constants ¶
const ID = "/noise"
ID is the protocol ID for noise
const LengthPrefixLength = 2
LengthPrefixLength is the length of the length prefix itself, which precedes all transport messages in order to delimit them. In bytes.
const MaxPlaintextLength = MaxTransportMsgLength - chacha20poly1305.Overhead
MaxPlaintextLength is the maximum payload size. It is MaxTransportMsgLength minus the MAC size. Payloads over this size will be automatically chunked.
const MaxTransportMsgLength = 0xffff
MaxTransportMsgLength is the Noise-imposed maximum transport message length, inclusive of the MAC size (16 bytes, Poly1305 for noise-libp2p).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Transport ¶
type Transport struct {
// contains filtered or unexported fields
}
Transport implements the interface sec.SecureTransport https://godoc.org/github.com/libp2p/go-libp2p-core/sec#SecureConn
func New ¶
New creates a new Noise transport using the given private key as its libp2p identity key.