picoquic/frames.c
uint8_t* picoquic_format_available_stream_frames(picoquic_cnx_t* cnx, uint8_t* bytes_next, uint8_t* bytes_max, int* more_data,
    int* is_pure_ack, int* stream_tried_and_failed, int* ret)
{
    uint8_t* bytes_previous = bytes_next;
    picoquic_stream_head_t* stream = picoquic_find_ready_stream(cnx);
    int more_stream_data = 0;

    while (*ret == 0 && stream != NULL && bytes_next < bytes_max) {
        int is_still_active = 0;

        bytes_next = picoquic_format_stream_frame(cnx, stream, bytes_next, bytes_max, &more_stream_data, is_pure_ack, &is_still_active, ret);

        if (*ret == 0) {
            if (bytes_next + 17 < bytes_max) {
                stream = picoquic_find_ready_stream(cnx);
            }
            else {
                more_stream_data = 1;
                break;
            }
        }
        else {
            break;
        }
    }

    *stream_tried_and_failed = (!more_stream_data && bytes_next == bytes_previous);
    *more_data |= more_stream_data;

    return bytes_next;
}
/* Format all available stream frames that fit in the packet.
 * Update more_data if more stream data is available
 * Update is_pure_ack if formated frames require ack
 * Set stream_tried_and_failed if there was nothing to send, indicating the app limited condition.
 */
Format all available stream frames that fit in the packet.
Update more_data if more stream data is available
Update is_pure_ack if formated frames require ack
Set stream_tried_and_failed if there was nothing to send, indicating the app limited condition.
Format all available stream frames that fit in the packet . Update more_data if more stream data is available Update is_pure_ack if formated frames require ack Set stream_tried_and_failed if there was nothing to send indicating the app limited condition .
uint8_t* picoquic_format_available_stream_frames(picoquic_cnx_t* cnx, uint8_t* bytes_next, uint8_t* bytes_max, int* more_data,
    int* is_pure_ack, int* stream_tried_and_failed, int* ret)
{
    uint8_t* bytes_previous = bytes_next;
    picoquic_stream_head_t* stream = picoquic_find_ready_stream(cnx);
    int more_stream_data = 0;
    while (*ret == 0 && stream != NULL && bytes_next < bytes_max) {
        int is_still_active = 0;
        bytes_next = picoquic_format_stream_frame(cnx, stream, bytes_next, bytes_max, &more_stream_data, is_pure_ack, &is_still_active, ret);
        if (*ret == 0) {
            if (bytes_next + 17 < bytes_max) {
                stream = picoquic_find_ready_stream(cnx);
            }
            else {
                more_stream_data = 1;
                break;
            }
        }
        else {
            break;
        }
    }
    *stream_tried_and_failed = (!more_stream_data && bytes_next == bytes_previous);
    *more_data |= more_stream_data;
    return bytes_next;
}
uint8_t * picoquic_format_available_stream_frames ( picoquic_cnx_t * cnx , uint8_t * bytes_next , uint8_t * bytes_max , int * more_data , int * is_pure_ack , int * stream_tried_and_failed , int * ret ) { uint8_t * bytes_previous = bytes_next ; picoquic_stream_head_t * stream = picoquic_find_ready_stream ( cnx ) ; int more_stream_data = 0 ; while ( * ret == 0 && stream != NULL && bytes_next < bytes_max ) { int is_still_active = 0 ; bytes_next = picoquic_format_stream_frame ( cnx , stream , bytes_next , bytes_max , & more_stream_data , is_pure_ack , & is_still_active , ret ) ; if ( * ret == 0 ) { if ( bytes_next + 17 < bytes_max ) { stream = picoquic_find_ready_stream ( cnx ) ; } else { more_stream_data = 1 ; break ; } } else { break ; } } * stream_tried_and_failed = ( ! more_stream_data && bytes_next == bytes_previous ) ; * more_data |= more_stream_data ; return bytes_next ; }
Format all available stream frames that fit in the packet.
Format all available stream frames that fit in the packet .