Versions in this module Expand all Collapse all v0 v0.7.19 Nov 29, 2026 Changes in this version type Stream + func (s *Stream) BytesReceived() uint64 + func (s *Stream) BytesSent() uint64 v0.7.18 Nov 26, 2026 Changes in this version + const MaxTotalMessageSize v0.7.17 Nov 23, 2026 Changes in this version + const DefaultFrameThreshold + const DefaultKeepAliveCount + const DefaultKeepAliveIdle + const DefaultKeepAliveInterval + const EndFlagComplete + const EndFlagPartial + const MaxHeaderSize + const MaxMessageSize + const NormalHeaderSize + type KeepAliveConfig struct + Count int + Enable bool + Idle time.Duration + Interval time.Duration + func DefaultKeepAliveConfig() KeepAliveConfig + func (k KeepAliveConfig) Apply(conn net.Conn) error + type Stream struct + func NewStream(conn net.Conn) *Stream + func NewStreamWithCryptoState(conn net.Conn, blob []byte) (*Stream, error) + func (s *Stream) Close() error + func (s *Stream) CryptoForSecretIsNoop() bool + func (s *Stream) EndMessage(ctx context.Context) error + func (s *Stream) EndMessageRead() error + func (s *Stream) ExportCryptoState() ([]byte, error) + func (s *Stream) FinalizeDigests() + func (s *Stream) GetConnection() net.Conn + func (s *Stream) GetEncryption() bool + func (s *Stream) GetFile(ctx context.Context, filename string) (int64, error) + func (s *Stream) GetPeerAddr() string + func (s *Stream) GetSecret(ctx context.Context) (string, error) + func (s *Stream) GetTimeout() time.Duration + func (s *Stream) IsAuthenticated() bool + func (s *Stream) IsConnected() bool + func (s *Stream) IsEncrypted() bool + func (s *Stream) PrepareCryptoForSecret() + func (s *Stream) PutFile(ctx context.Context, filename string) (int64, error) + func (s *Stream) PutSecret(ctx context.Context, secret string) error + func (s *Stream) ReadFrame(ctx context.Context) ([]byte, bool, error) + func (s *Stream) ReadMessageBytes(ctx context.Context, data []byte) (int, error) + func (s *Stream) ReceiveCompleteMessage(ctx context.Context) ([]byte, error) + func (s *Stream) ReceiveFrame(ctx context.Context) ([]byte, error) + func (s *Stream) ReceiveFrameWithEnd(ctx context.Context) ([]byte, byte, error) + func (s *Stream) ReceivedFrame() bool + func (s *Stream) RestoreCryptoAfterSecret() + func (s *Stream) SendMessage(ctx context.Context, data []byte) error + func (s *Stream) SendPartialMessage(ctx context.Context, data []byte) error + func (s *Stream) SetAuthenticated(authenticated bool) + func (s *Stream) SetConnection(conn net.Conn) + func (s *Stream) SetCryptoMode(enabled bool) bool + func (s *Stream) SetEncrypted(encrypted bool) + func (s *Stream) SetPeerAddr(addr string) + func (s *Stream) SetSymmetricKey(key []byte) error + func (s *Stream) SetTimeout(duration time.Duration) error + func (s *Stream) StartMessage() + func (s *Stream) StartMessageRead(ctx context.Context) error + func (s *Stream) WriteFrame(ctx context.Context, data []byte, isEOM bool) error + func (s *Stream) WriteMessage(ctx context.Context, data []byte) error