code: async function close(callback) {
              await closeStream(client.stream);
              await closeStream(client.rpc);
              if (callback) {
                  return callback();
              }
          }
docs: Closes both the stream and rpc socket connection to the server. Should be called to free up resources and end the event loop.
  @name close
  @param {function} [callback] The callback to execute after closing.
  @returns {Promise.<void>}