c78dc67973f0b3977fb516d8d2559eefd0774ce9
Add NatsParser that reads NATS protocol commands from ReadOnlySequence<byte>. Identifies commands by first 2 bytes using case-insensitive bit masking. Handles PUB/HPUB payload reading with stateful _awaitingPayload for split-packet scenarios. Uses Span<Range> for zero-allocation argument splitting and ParseSize for ASCII decimal parsing. Includes CommandType enum, ParsedCommand struct, and ProtocolViolationException. 14 tests covering PING, PONG, CONNECT, INFO, SUB (with/without queue), UNSUB (with/without max), PUB (with/without reply, zero payload), HPUB, multiple commands, and case insensitivity.
Description
No description provided
Languages
C#
99.9%