Protected
cachedProtected
onProtected
Readonly
underlyingStatic
Readonly
MESSAGE_Protected
messageProtected
dataProtected
emitProtected
encodeProtected
handleProtected
handleProtected
handleProtected
readReads 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.
An error if the message start can not be read successfully.
A
BinaryMessagePipe
is capable of sending and retrieving binary messages i.e. Uint8Arrays 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.