read and drop all remaining data in stream
the internal Duplex
pipe howMany bytes to targetStream
bytes to transfer
destination stream
Promise that resolves when all bytes are transferred
should read code or failed the correct fail exception will be thow in case of error.
the expected 4 char code to read
read socket until \r\n
Optionalencoding: BufferEncodingread stream until a delimiter is found
delimiter
buffer without delimiter
read a 4-ASCII digits length-prefixed data block
read a 4-ASCII digits length-prefixed data block
helper to read in Duplex stream