Optionaloptions: AbortOptionsAfter calling this method the stream can no longer be used. Any unread data will be emitted as a message event during the microtask queue of the current event loop tick.
Write the passed bytes to the stream
Optionaloptions: AbortOptions
Read bytes from the stream.
If a required number of bytes is passed as an option, this will wait for the underlying stream to supply that number of bytes, throwing an
UnexpectedEOFErrorif the stream closes before this happens.If no required number of bytes is passed, this will return
nullif the underlying stream closes before supplying any bytes.