Documentation
¶
Index ¶
- Constants
- Variables
- func AckBytes(frame Frame) (uint32, error)
- func ClampDimensions(cols, rows uint16) (uint16, uint16, bool)
- func EncodeClient(frame Frame) ([]byte, error)
- func EncodeServer(frame Frame) ([]byte, error)
- func ValidOpcode(direction Direction, opcode byte) bool
- type Direction
- type Flow
- type Frame
- type Queue
- type QueueOptions
Constants ¶
View Source
const ( AckGrainBytes = 16 << 10 AckHighWatermark = 256 << 10 AckLowWatermark = 64 << 10 AckPendingLimit = 1 << 20 DropQueueLimit = 64 << 10 )
View Source
const ( Subprotocol = "compozy.terminal.v3" ProtocolDescription = "" /* 410-byte string literal not displayed */ MaxInputBytes = 65536 MinCols = 20 MaxCols = 2000 MinRows = 5 MaxRows = 1000 ServerOpOutput byte = 0x01 ServerOpAttached byte = 0x02 ServerOpExit byte = 0x03 ServerOpError byte = 0x04 ServerOpTitle byte = 0x05 ServerOpResized byte = 0x06 ServerOpGap byte = 0x07 ServerOpPresence byte = 0x08 ServerOpRedactedInput byte = 0x09 ClientOpInput byte = 0x01 ClientOpAck byte = 0x02 ClientOpResize byte = 0x03 ClientOpSignal byte = 0x04 ClientOpDetach byte = 0x05 )
Variables ¶
View Source
var ( ErrUnknownOpcode = errors.New("terminal wire: unknown opcode") ErrInvalidFrame = errors.New("terminal wire: invalid frame") ErrInputTooLarge = errors.New("terminal wire: input frame exceeds 64 KiB") )
View Source
var ProtocolManifest []byte
ProtocolManifest is the authoritative terminal wire manifest embedded for code generation.
Functions ¶
func ClampDimensions ¶
ClampDimensions normalizes a non-zero terminal size to protocol bounds.
func EncodeClient ¶
func EncodeServer ¶
func ValidOpcode ¶
ValidOpcode reports whether opcode is assigned in the selected direction.
Types ¶
type Direction ¶
type Direction uint8
Direction selects the opcode namespace used to validate a frame.
type Queue ¶
type Queue struct {
// contains filtered or unexported fields
}
func NewQueue ¶
func NewQueue(options QueueOptions) *Queue
func (*Queue) CloseReason ¶
func (*Queue) PendingBytes ¶
Click to show internal directories.
Click to hide internal directories.