Documentation
¶
Overview ¶
Package writecontrol shares outbound-progress notifications between the transport and protocol packages without adding public factory methods.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Access ¶
type Access[T Getter] struct{}
Access exposes only a package-private capability. Embedding this zero-sized value first in a connection preserves its layout and lets sibling packages subscribe to outbound progress without adding public methods. The original source is passed through so a getter can support promoted access from concrete wrappers.
type Control ¶
type Control struct {
// contains filtered or unexported fields
}
Control notifies watchers when an output boundary retires wire bytes (sent > 0) or opens queue/window capacity without a socket send (sent == 0).
Watchers run on the goroutine that retired the output or advanced the protocol window, so they must return promptly and must not block, write to, or close the connection synchronously.
func New ¶
New constructs a write controller. inexact marks a boundary whose path passes through an OutboundHolder, where wire byte counts cannot prove a specific queued write left until OutboundBuffered reaches zero.
func (*Control) Inexact ¶
Inexact reports whether wire byte counts below this boundary may expand or retransmit held payload before reaching the socket.