
ngtcp2_crypto_recv_crypto_data_cb
=================================

Synopsis
--------

*#include <ngtcp2/ngtcp2_crypto.h>*

.. function:: int ngtcp2_crypto_recv_crypto_data_cb( ngtcp2_conn *conn, ngtcp2_encryption_level encryption_level, uint64_t offset, const uint8_t *data, size_t datalen, void *user_data)

    
    `ngtcp2_crypto_recv_crypto_data_cb` is a wrapper function around
    `ngtcp2_crypto_read_write_crypto_data`.  It can be directly passed
    to :member:`ngtcp2_callbacks.recv_crypto_data` field.
    
    For quictls and OpenSSL, the following error codes are treated as
    success:
    
    - -10001 (e.g., :macro:`NGTCP2_CRYPTO_QUICTLS_ERR_TLS_WANT_X509_LOOKUP`)
    - -10002 (e.g., :macro:`NGTCP2_CRYPTO_QUICTLS_ERR_TLS_WANT_CLIENT_HELLO_CB`)
    
    To continue the interrupted handshake, call
    `ngtcp2_conn_continue_handshake`.
    
    See :ref:`tls-integration` for more details.
    
    If this function is used, the TLS implementation specific error
    codes described in `ngtcp2_crypto_read_write_crypto_data` are
    treated as if it returns -1 except for those that are listed above.
    Do not use this function if an application wishes to use the TLS
    implementation specific error codes.
