static void s_process_iot_st_msg()

in source/secure_tunneling.c [273:299]


static void s_process_iot_st_msg(struct aws_secure_tunnel *secure_tunnel, struct aws_iot_st_msg *st_msg) {
    /* TODO: Check stream_id, send reset? */

    switch (st_msg->type) {
        case DATA:
            secure_tunnel->options->on_data_receive(&st_msg->payload, secure_tunnel->options->user_data);
            break;
        case STREAM_START:
            s_handle_stream_start(secure_tunnel, st_msg);
            break;
        case STREAM_RESET:
            s_handle_stream_reset(secure_tunnel, st_msg);
            break;
        case SESSION_RESET:
            s_handle_session_reset(secure_tunnel);
            break;
        case UNKNOWN:
        default:
            if (!st_msg->ignorable) {
                AWS_LOGF_WARN(
                    AWS_LS_IOTDEVICE_SECURE_TUNNELING,
                    "Encountered an unknown but un-ignorable message. type=%d",
                    st_msg->type);
            }
            break;
    }
}