- * get_one_metadata_packet returns the number of bytes
- * received, 0 when we have received everything, a
- * negative value on error.
+ * lttng_live_get_one_metadata_packet() asks the Relay Daemon
+ * for new metadata. If new metadata is received, the function
+ * writes it to the provided file handle and updates the
+ * reply_len output parameter. We call this function in loop
+ * until it returns _END meaning that no new metadata is
+ * available.
+ * We may receive a _CLOSED status if the metadata stream we
+ * are requesting is no longer available on the relay.
+ * If we receive an _ERROR status, it means there was a
+ * networking, allocating, or some other unrecoverable error.