picoquic/frames.c
uint8_t* picoquic_decode_handshake_done_frame(picoquic_cnx_t* cnx, uint8_t* bytes, uint64_t current_time)
{
    if (!cnx->client_mode) {
        DBG_PRINTF("Handshake done (0x%x) not expected from client", bytes[0]);
        picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION, bytes[0]);
        bytes = NULL;
    }
    else {
        bytes++;

        /* The connection is now confirmed */
        if (cnx->cnx_state == picoquic_state_client_ready_start) {
            /* Transition to client ready state.
             * The handshake is complete, all the handshake packets are implicitly acknowledged */
            picoquic_ready_state_transition(cnx, current_time);
        }
        else if (cnx->cnx_state < picoquic_state_client_ready_start) {
            DBG_PRINTF("Handshake done (0x%x) not expected in state %d", bytes[0], cnx->cnx_state);
            picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION, picoquic_frame_type_handshake_done);
            bytes = NULL;
        }
    }
    return bytes;
}
/* Handling of Handshake Done frame. 
 * The decode function is defined here, as well as a queue function.
 * There is no prepare function or skip function for this single byte frame.
 */
Handling of Handshake Done frame.
The decode function is defined here, as well as a queue function.
There is no prepare function or skip function for this single byte frame.
Handling of Handshake Done frame . The decode function is defined here as well as a queue function . There is no prepare function or skip function for this single byte frame .
uint8_t* picoquic_decode_handshake_done_frame(picoquic_cnx_t* cnx, uint8_t* bytes, uint64_t current_time)
{
    if (!cnx->client_mode) {
        DBG_PRINTF("Handshake done (0x%x) not expected from client", bytes[0]);
        picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION, bytes[0]);
        bytes = NULL;
    }
    else {
        bytes++;
        if (cnx->cnx_state == picoquic_state_client_ready_start) {
            picoquic_ready_state_transition(cnx, current_time);
        }
        else if (cnx->cnx_state < picoquic_state_client_ready_start) {
            DBG_PRINTF("Handshake done (0x%x) not expected in state %d", bytes[0], cnx->cnx_state);
            picoquic_connection_error(cnx, PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION, picoquic_frame_type_handshake_done);
            bytes = NULL;
        }
    }
    return bytes;
}
uint8_t * picoquic_decode_handshake_done_frame ( picoquic_cnx_t * cnx , uint8_t * bytes , uint64_t current_time ) { if ( ! cnx -> client_mode ) { DBG_PRINTF ( " " , bytes [ 0 ] ) ; picoquic_connection_error ( cnx , PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION , bytes [ 0 ] ) ; bytes = NULL ; } else { bytes ++ ; if ( cnx -> cnx_state == picoquic_state_client_ready_start ) { picoquic_ready_state_transition ( cnx , current_time ) ; } else if ( cnx -> cnx_state < picoquic_state_client_ready_start ) { DBG_PRINTF ( " " , bytes [ 0 ] , cnx -> cnx_state ) ; picoquic_connection_error ( cnx , PICOQUIC_TRANSPORT_PROTOCOL_VIOLATION , picoquic_frame_type_handshake_done ) ; bytes = NULL ; } } return bytes ; }
Handling of Handshake Done frame.
Handling of Handshake Done frame .
/* The connection is now confirmed */ /* Transition to client ready state.
             * The handshake is complete, all the handshake packets are implicitly acknowledged */