Versions in this module Expand all Collapse all v0 v0.23.5 Nov 8, 2022 Changes in this version + const ID + const LengthPrefixLength + const MaxPlaintextLength + const MaxTransportMsgLength + type EarlyDataHandler interface + Received func(context.Context, net.Conn, *pb.NoiseExtensions) error + Send func(context.Context, net.Conn, peer.ID) *pb.NoiseExtensions + type SessionOption = func(*SessionTransport) error + func EarlyData(initiator, responder EarlyDataHandler) SessionOption + func Prologue(prologue []byte) SessionOption + type SessionTransport struct + func (i *SessionTransport) SecureInbound(ctx context.Context, insecure net.Conn, p peer.ID) (sec.SecureConn, error) + func (i *SessionTransport) SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (sec.SecureConn, error) + type Transport struct + func New(privkey crypto.PrivKey) (*Transport, error) + func (t *Transport) SecureInbound(ctx context.Context, insecure net.Conn, p peer.ID) (sec.SecureConn, error) + func (t *Transport) SecureOutbound(ctx context.Context, insecure net.Conn, p peer.ID) (sec.SecureConn, error) + func (t *Transport) WithSessionOptions(opts ...SessionOption) (sec.SecureTransport, error)