Versions in this module Expand all Collapse all v1 v1.0.1 Sep 4, 2026 v1.0.0 Aug 6, 2026 Changes in this version + var ErrConsumed = errors.New("peer consumed more than sent") + var ErrGoAway = errors.New("stream id overflows, should start a new connection") + var ErrInvalidProtocol = errors.New("invalid protocol") + var ErrTimeout net.Error = &timeoutError + var ErrWouldBlock = errors.New("operation would block on IO") + func NewShaperQueue() *shaperQueue + func VerifyConfig(config *Config) error + type Allocator struct + func (alloc *Allocator) Get(size int) []byte + func (alloc *Allocator) Put(buffer []byte) error + type CLASSID int32 + const CLSCTRL + const CLSDATA + type Config struct + IdleProbeAfter time.Duration + IdleProbeTimeout time.Duration + KeepAliveDisabled bool + KeepAliveInterval time.Duration + KeepAliveTimeout time.Duration + MaxFrameSize int + MaxStreamBuffer int + StreamReadTimeout time.Duration + Version int + func DefaultConfig() *Config + type Frame struct + type Session struct + func Client(conn io.ReadWriteCloser, config *Config) (*Session, error) + func Server(conn io.ReadWriteCloser, config *Config) (*Session, error) + func (s *Session) Accept() (io.ReadWriteCloser, error) + func (s *Session) AcceptStream() (*Stream, error) + func (s *Session) Close() error + func (s *Session) IsClosed() bool + func (s *Session) LocalAddr() net.Addr + func (s *Session) NumStreams() int + func (s *Session) Open() (io.ReadWriteCloser, error) + func (s *Session) OpenStream() (*Stream, error) + func (s *Session) RemoteAddr() net.Addr + func (s *Session) SetDeadline(t time.Time) error + type Stream struct + func (s *Stream) Close() error + func (s *Stream) CloseWrite() error + func (s *Stream) LocalAddr() net.Addr + func (s *Stream) Read(b []byte) (n int, err error) + func (s *Stream) RemoteAddr() net.Addr + func (s *Stream) SetDeadline(t time.Time) error + func (s *Stream) SetReadDeadline(t time.Time) error + func (s *Stream) SetWriteDeadline(t time.Time) error + func (s *Stream) Write(b []byte) (n int, err error) + func (s *Stream) WriteTo(w io.Writer) (n int64, err error)