Skip to main content

Module pktline

Module pktline 

Source
Expand description

Git’s packet-line protocol — the framing used by filter-process and a handful of other long-running git subprocess interfaces.

Each packet is <4-byte hex length><payload>, where the length includes the 4 length bytes themselves. The special length 0000 (no payload) is the flush packet, used as a delimiter.

Structs§

Reader
Reads packets from an underlying Read.
Sink
A Write adapter that splits writes into pktline packets, suitable for streaming smudge content through the filter-process response protocol.
Writer
Writes packets to an underlying Write.

Constants§

MAX_PACKET_DATA
Maximum payload size of a single packet (65520 − 4 length bytes).