Versions in this module Expand all Collapse all v0 v0.29.0 Jul 29, 2023 Changes in this version + const ID + const LengthPrefixLength + const MaxPlaintextLength + const MaxTransportMsgLength + func SessionWithConnState(s *secureSession, muxer protocol.ID) *secureSession + 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 DisablePeerIDCheck() SessionOption + func EarlyData(initiator, responder EarlyDataHandler) SessionOption + func Prologue(prologue []byte) SessionOption + type SessionTransport struct + func (i *SessionTransport) ID() protocol.ID + 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(id protocol.ID, privkey crypto.PrivKey, muxers []tptu.StreamMuxer) (*Transport, error) + func (t *Transport) ID() protocol.ID + 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) (*SessionTransport, error)