Flags
constFlags:object
Defined in: packages/protocol/src/wire-format.ts:72
Flag bits for the flags byte.
IMPORTANT: These flags are used in BINARY protocol for DATA PLANE. This is NOT JSON-RPC. This is raw binary for performance.
Layout:
bit 0: DIRECTION_TO_PARENT (0 = to child, 1 = to parent)bit 1: IS_RESPONSE (0 = request/event, 1 = response)bit 2: IS_ERROR (0 = ok, 1 = error)bit 3: IS_STREAM (0 = single, 1 = stream chunk)bit 4: STREAM_END (0 = more coming, 1 = final chunk)bit 5: IS_ACK (0 = full response, 1 = ack only)bit 6-7: reserved (must be 0)Type Declaration
Section titled “Type Declaration”DIRECTION_TO_PARENT
Section titled “DIRECTION_TO_PARENT”
readonlyDIRECTION_TO_PARENT:1=0b00000001
Message direction: 0 = to child, 1 = to parent
IS_ACK
Section titled “IS_ACK”
readonlyIS_ACK:32=0b00100000
Is this just an ACK (not full response)?
IS_ERROR
Section titled “IS_ERROR”
readonlyIS_ERROR:4=0b00000100
Is this an error response?
IS_RESPONSE
Section titled “IS_RESPONSE”
readonlyIS_RESPONSE:2=0b00000010
Is this a response? 0 = request/event, 1 = response
IS_STREAM
Section titled “IS_STREAM”
readonlyIS_STREAM:8=0b00001000
Is this a stream chunk?
STREAM_END
Section titled “STREAM_END”
readonlySTREAM_END:16=0b00010000
Is this the final stream chunk?