Dispose this object.
Encodes the start of a new message into a {@link Uint8Array}. The message start consists of a identifier string and the length of the following message.
the buffer contains the encoded message start
Reads the start of a new message from a stream chunk (or cached message) received from the underlying pipe. The message start is expected to consist of an identifier string and the length of the message.
The stream chunk.
The length of the message content to read.
A
BinaryMessagePipe
is capable of sending and retrieving binary messages i.e. {@link Uint8Array}s over and underlying streamed process pipe/fd. The message length of individual messages is encoding at the beginning of a new message. This makes it possible to extract messages from the streamed data.