stream(readable, is_binary = true) {
        // Ensure readable is an instance of a stream.Readable
        if (!(readable instanceof Readable))
            throw new Error('Websocket.stream(readable) -> readable must be a Readable stream.');

        // Prevent multiple streams from taking place
        if (this.#stream)
            throw new Error(
                'Websocket.stream(readable) -> You may not stream data while another stream operation is active on this websocket. Make sure you are not already streaming or piping a stream to this websocket.'
            );

        // Return a promise which resolves once stream has finished
        const scope = this;
        return new Promise((resolve) => {
            // Store the readable as the pending stream for this connection
            scope.#stream = readable;

            // Bind a listener for the 'data' event to consume chunks
            let is_first = true; // By default, we will send the first chunk as a fragment
            readable.on('data', (chunk) => {
                // Check to see if we have a fragment to send post buffering
                const fragment = scope._buffer_fragment(chunk);
                if (fragment) {
                    // Stream the retrieved current fragment
                    scope._stream_chunk(readable, is_first ? FRAGMENTS.FIRST : FRAGMENTS.MIDDLE, fragment, is_binary);

                    // If this was the first chunk, invert the is_first boolean
                    if (is_first) is_first = false;
                }
            });

            // Create a callback for ending the readable consumption
            const end_stream = () => {
                // Retrieve the last buffered fragment to send as last or only chunk
                const fragment = scope._buffer_fragment();

                // If we streamed no individual fragments aka. the is_first flag was set to true, then we did no streaming and can simply send the last fragment as a message
                if (is_first) {
                    scope.#ws.send(fragment, is_binary);
                } else {
                    // Stream the final chunk as last fragment
                    scope._stream_chunk(scope.#stream, FRAGMENTS.LAST, fragment, is_binary);
                }

                // Clean up the readable
                scope.#stream = undefined;
                resolve();
            };

            // Bind listeners to end the framented write procedure
            readable.once('end', end_stream);
        });
    }
This method is used to stream a message to the receiver.
Note! The data is by default streamed as Binary due to how partial fragments are sent.
This is done to prevent processing errors depending on client's receiver's incoming fragment processing strategy.

@param {Readable} readable A Readable stream which will be consumed as message
@param {Boolean=} is_binary Whether data being streamed is in binary. Default: true
@returns {Promise}