Documentation
¶
Index ¶
Constants ¶
const ( DefaultBatchWindow = 150 * time.Microsecond BatchingEnabled = true )
const StreamOpenDelay = 10 // ms
Variables ¶
This section is empty.
Functions ¶
func IsTimeoutErr ¶
IsTimeoutErr checks whether the given error is a QUIC idle timeout error.
func ReleaseRequest ¶
ReleaseRequest returns a protobuf Request to the pool.
func ReleaseResponse ¶
ReleaseResponse returns a protobuf Response to the pool.
Types ¶
type Batcher ¶
type Batcher struct {
// contains filtered or unexported fields
}
Batcher coalesces small writes into larger ones with a configurable flush window to reduce syscall overhead. When BatchingEnabled is true, the first write goes through immediately and subsequent writes are buffered until Flush is called.
func NewBatcher ¶
NewBatcher creates a new Batcher for the given stream.
type Multiplexer ¶
Multiplexer manages a pool of pre-opened QUIC streams over a single connection and dispatches incoming frames via the sharded map.
func NewMultiplexer ¶
func NewMultiplexer( conn *quic.Conn, quicbalancer qrpc_quic.Balancer, streamsCount uint16, chansMap *internal.ShardedMap, ) Multiplexer
NewMultiplexer creates a new Multiplexer, opens streamsCount QUIC streams, and starts read-cycle goroutines for each stream.
type MultiplexerImpl ¶
type MultiplexerImpl struct {
// contains filtered or unexported fields
}
MultiplexerImpl is the concrete implementation of Multiplexer. It opens streamsCount pre-created QUIC streams and runs read-cycle goroutines.
func (*MultiplexerImpl) Close ¶
func (m *MultiplexerImpl) Close()
func (*MultiplexerImpl) GetBatcher ¶
func (m *MultiplexerImpl) GetBatcher(s *quic.Stream) *Batcher