view release on metacpan or search on metacpan
vendor/nghttp3-1.18.0/lib/nghttp3_balloc.c
vendor/nghttp3-1.18.0/lib/nghttp3_balloc.h
vendor/nghttp3-1.18.0/lib/nghttp3_buf.c
vendor/nghttp3-1.18.0/lib/nghttp3_buf.h
vendor/nghttp3-1.18.0/lib/nghttp3_callbacks.c
vendor/nghttp3-1.18.0/lib/nghttp3_callbacks.h
vendor/nghttp3-1.18.0/lib/nghttp3_conn.c
vendor/nghttp3-1.18.0/lib/nghttp3_conn.h
vendor/nghttp3-1.18.0/lib/nghttp3_conv.c
vendor/nghttp3-1.18.0/lib/nghttp3_conv.h
vendor/nghttp3-1.18.0/lib/nghttp3_debug.c
vendor/nghttp3-1.18.0/lib/nghttp3_debug.h
vendor/nghttp3-1.18.0/lib/nghttp3_err.c
vendor/nghttp3-1.18.0/lib/nghttp3_err.h
vendor/nghttp3-1.18.0/lib/nghttp3_frame.c
vendor/nghttp3-1.18.0/lib/nghttp3_frame.h
vendor/nghttp3-1.18.0/lib/nghttp3_gaptr.c
vendor/nghttp3-1.18.0/lib/nghttp3_gaptr.h
vendor/nghttp3-1.18.0/lib/nghttp3_http.c
vendor/nghttp3-1.18.0/lib/nghttp3_http.h
vendor/nghttp3-1.18.0/lib/nghttp3_idtr.c
vendor/nghttp3-1.18.0/lib/nghttp3_idtr.h
vendor/nghttp3-1.18.0/CMakeOptions.txt view on Meta::CPAN
# Features that can be enabled for cmake (see CMakeLists.txt)
option(ENABLE_WERROR "Make compiler warnings fatal" OFF)
option(ENABLE_DEBUG "Turn on debug output")
option(ENABLE_ASAN "Enable AddressSanitizer (ASAN)" OFF)
option(ENABLE_LIB_ONLY "Build libnghttp3 only" OFF)
option(ENABLE_STATIC_LIB "Build libnghttp3 as a static library" ON)
option(ENABLE_SHARED_LIB "Build libnghttp3 as a shared library" ON)
option(ENABLE_STATIC_CRT "Build libnghttp3 against the MS LIBCMT[d]")
cmake_dependent_option(BUILD_TESTING "Enable tests" ON "ENABLE_STATIC_LIB" OFF)
# vim: ft=cmake:
vendor/nghttp3-1.18.0/cmakeconfig.h.in view on Meta::CPAN
/* Define to `int' if <sys/types.h> does not define. */
#cmakedefine ssize_t @ssize_t@
/* Define to 1 to enable debug output. */
#cmakedefine DEBUGBUILD 1
/* Define to 1 if you have the <arpa/inet.h> header file. */
#cmakedefine HAVE_ARPA_INET_H 1
/* Define to 1 if you have the <unistd.h> header file. */
#cmakedefine HAVE_UNISTD_H 1
/* Define to 1 if you have the <sys/endian.h> header file. */
#cmakedefine HAVE_SYS_ENDIAN_H 1
vendor/nghttp3-1.18.0/lib/CMakeLists.txt view on Meta::CPAN
nghttp3_conv.c
nghttp3_buf.c
nghttp3_ringbuf.c
nghttp3_pq.c
nghttp3_map.c
nghttp3_ksl.c
nghttp3_qpack.c
nghttp3_qpack_huffman.c
nghttp3_qpack_huffman_data.c
nghttp3_err.c
nghttp3_debug.c
nghttp3_conn.c
nghttp3_stream.c
nghttp3_frame.c
nghttp3_tnode.c
nghttp3_vec.c
nghttp3_gaptr.c
nghttp3_idtr.c
nghttp3_range.c
nghttp3_http.c
nghttp3_version.c
vendor/nghttp3-1.18.0/lib/includes/nghttp3/nghttp3.h view on Meta::CPAN
*/
NGHTTP3_EXTERN void
nghttp3_qpack_encoder_set_indexing_strat(nghttp3_qpack_encoder *encoder,
nghttp3_qpack_indexing_strat strat);
/**
* @function
*
* `nghttp3_qpack_encoder_ack_everything` tells |encoder| that all
* encoded HTTP field sections are acknowledged. This function is
* provided for debugging purpose only. In HTTP/3, |encoder| knows
* this by reading decoder stream with
* `nghttp3_qpack_encoder_read_decoder`.
*/
NGHTTP3_EXTERN void
nghttp3_qpack_encoder_ack_everything(nghttp3_qpack_encoder *encoder);
/**
* @function
*
* .. warning::
vendor/nghttp3-1.18.0/lib/includes/nghttp3/nghttp3.h view on Meta::CPAN
/**
* @function
*
* `nghttp3_qpack_decoder_set_max_dtable_capacity` sets
* |max_dtable_capacity| as maximum dynamic table size.
* |max_dtable_capacity| must be equal to, or smaller than
* ``hard_max_dtable_capacity`` parameter of
* `nghttp3_qpack_decoder_new`. Normally, the maximum capacity is
* communicated in encoder stream. This function is provided for
* debugging and testing purpose.
*
* This function returns 0 if it succeeds, or one of the following
* negative error codes:
*
* :macro:`NGHTTP3_ERR_INVALID_ARGUMENT`
* |max_dtable_capacity| exceeds the upper bound of the dynamic
* table capacity.
*/
NGHTTP3_EXTERN int
nghttp3_qpack_decoder_set_max_dtable_capacity(nghttp3_qpack_decoder *decoder,
vendor/nghttp3-1.18.0/lib/includes/nghttp3/nghttp3.h view on Meta::CPAN
* @function
*
* `nghttp3_err_infer_quic_app_error_code` returns a QUIC application
* error code which corresponds to |liberr|.
*/
NGHTTP3_EXTERN uint64_t nghttp3_err_infer_quic_app_error_code(int liberr);
/**
* @functypedef
*
* :type:`nghttp3_debug_vprintf_callback` is a callback function
* invoked when the library outputs debug logging. The function is
* called with arguments suitable for :manpage:`vfprintf(3)`.
*
* The debug output is only enabled if the library is built with
* :macro:`DEBUGBUILD` macro defined.
*/
typedef void (*nghttp3_debug_vprintf_callback)(const char *format,
va_list args);
/**
* @function
*
* `nghttp3_set_debug_vprintf_callback` sets a debug output callback
* called by the library when built with :macro:`DEBUGBUILD` macro
* defined. If a callback function is not set by this function, debug
* log is written into standard error output.
*
* For builds without :macro:`DEBUGBUILD` macro defined, this function
* is noop.
*
* Note that building with :macro:`DEBUGBUILD` may cause significant
* performance penalty to libnghttp3 because of extra processing. It
* should be used for debugging purpose only.
*
* .. Warning::
*
* Building with :macro:`DEBUGBUILD` may cause significant
* performance penalty to libnghttp3 because of extra processing.
* It should be used for debugging purpose only. We write this two
* times because this is important.
*/
NGHTTP3_EXTERN void nghttp3_set_debug_vprintf_callback(
nghttp3_debug_vprintf_callback debug_vprintf_callback);
/**
* @macrosection
*
* Shutdown related constants
*/
/**
* @macro
*
vendor/nghttp3-1.18.0/lib/nghttp3_debug.c view on Meta::CPAN
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
* LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
* OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nghttp3_debug.h"
#include <stdio.h>
#ifdef DEBUGBUILD
static void nghttp3_default_debug_vfprintf_callback(const char *fmt,
va_list args) {
vfprintf(stderr, fmt, args);
}
static nghttp3_debug_vprintf_callback static_debug_vprintf_callback =
nghttp3_default_debug_vfprintf_callback;
void nghttp3_debug_vprintf(const char *format, ...) {
if (static_debug_vprintf_callback) {
va_list args;
va_start(args, format);
static_debug_vprintf_callback(format, args);
va_end(args);
}
}
void nghttp3_set_debug_vprintf_callback(
nghttp3_debug_vprintf_callback debug_vprintf_callback) {
static_debug_vprintf_callback = debug_vprintf_callback;
}
#else /* !defined(DEBUGBUILD) */
void nghttp3_set_debug_vprintf_callback(
nghttp3_debug_vprintf_callback debug_vprintf_callback) {
(void)debug_vprintf_callback;
}
#endif /* !defined(DEBUGBUILD) */
vendor/nghttp3-1.18.0/lib/nghttp3_debug.h view on Meta::CPAN
#ifndef NGHTTP3_DEBUG_H
#define NGHTTP3_DEBUG_H
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif /* defined(HAVE_CONFIG_H) */
#include <nghttp3/nghttp3.h>
#ifdef DEBUGBUILD
# define DEBUGF(...) nghttp3_debug_vprintf(__VA_ARGS__)
void nghttp3_debug_vprintf(const char *format, ...);
#else /* !defined(DEBUGBUILD) */
# define DEBUGF(...) \
do { \
} while (0)
#endif /* !defined(DEBUGBUILD) */
#endif /* !defined(NGHTTP3_DEBUG_H) */
vendor/nghttp3-1.18.0/lib/nghttp3_ksl.h view on Meta::CPAN
*/
static inline const nghttp3_ksl_key *
nghttp3_ksl_blk_nth_key(const nghttp3_ksl_blk *blk, size_t n) {
return blk->keys + n * blk->aligned_keylen;
}
#ifndef WIN32
/*
* nghttp3_ksl_print prints its internal state in stderr. It assumes
* that the key is of type int64_t. This function should be used for
* the debugging purpose only.
*/
void nghttp3_ksl_print(const nghttp3_ksl *ksl);
#endif /* !defined(WIN32) */
/*
* nghttp3_ksl_it_init initializes |it|.
*/
void nghttp3_ksl_it_init(nghttp3_ksl_it *it, nghttp3_ksl_blk *blk, size_t i);
/*
vendor/nghttp3-1.18.0/lib/nghttp3_mem.c view on Meta::CPAN
}
void *nghttp3_mem_calloc(const nghttp3_mem *mem, size_t nmemb, size_t size) {
return mem->calloc(nmemb, size, mem->user_data);
}
void *nghttp3_mem_realloc(const nghttp3_mem *mem, void *ptr, size_t size) {
return mem->realloc(ptr, size, mem->user_data);
}
#else /* defined(MEMDEBUG) */
void *nghttp3_mem_malloc_debug(const nghttp3_mem *mem, size_t size,
const char *func, const char *file,
size_t line) {
void *nptr = mem->malloc(size, mem->user_data);
fprintf(stderr, "malloc %p size=%zu in %s at %s:%zu\n", nptr, size, func,
file, line);
return nptr;
}
void nghttp3_mem_free_debug(const nghttp3_mem *mem, void *ptr, const char *func,
const char *file, size_t line) {
fprintf(stderr, "free ptr=%p in %s at %s:%zu\n", ptr, func, file, line);
mem->free(ptr, mem->user_data);
}
void nghttp3_mem_free2_debug(const nghttp3_free free_func, void *ptr,
void *user_data, const char *func,
const char *file, size_t line) {
fprintf(stderr, "free ptr=%p in %s at %s:%zu\n", ptr, func, file, line);
free_func(ptr, user_data);
}
void *nghttp3_mem_calloc_debug(const nghttp3_mem *mem, size_t nmemb,
size_t size, const char *func, const char *file,
size_t line) {
void *nptr = mem->calloc(nmemb, size, mem->user_data);
fprintf(stderr, "calloc %p nmemb=%zu size=%zu in %s at %s:%zu\n", nptr, nmemb,
size, func, file, line);
return nptr;
}
void *nghttp3_mem_realloc_debug(const nghttp3_mem *mem, void *ptr, size_t size,
const char *func, const char *file,
size_t line) {
void *nptr = mem->realloc(ptr, size, mem->user_data);
fprintf(stderr, "realloc %p ptr=%p size=%zu in %s at %s:%zu\n", nptr, ptr,
size, func, file, line);
return nptr;
}
#endif /* defined(MEMDEBUG) */
vendor/nghttp3-1.18.0/lib/nghttp3_mem.h view on Meta::CPAN
#include <nghttp3/nghttp3.h>
/* Convenient wrapper functions to call allocator function in
|mem|. */
#ifndef MEMDEBUG
void *nghttp3_mem_malloc(const nghttp3_mem *mem, size_t size);
void nghttp3_mem_free(const nghttp3_mem *mem, void *ptr);
void *nghttp3_mem_calloc(const nghttp3_mem *mem, size_t nmemb, size_t size);
void *nghttp3_mem_realloc(const nghttp3_mem *mem, void *ptr, size_t size);
#else /* defined(MEMDEBUG) */
void *nghttp3_mem_malloc_debug(const nghttp3_mem *mem, size_t size,
const char *func, const char *file, size_t line);
# define nghttp3_mem_malloc(MEM, SIZE) \
nghttp3_mem_malloc_debug((MEM), (SIZE), __func__, __FILE__, __LINE__)
void nghttp3_mem_free_debug(const nghttp3_mem *mem, void *ptr, const char *func,
const char *file, size_t line);
# define nghttp3_mem_free(MEM, PTR) \
nghttp3_mem_free_debug((MEM), (PTR), __func__, __FILE__, __LINE__)
void nghttp3_mem_free2_debug(nghttp3_free free_func, void *ptr, void *user_data,
const char *func, const char *file, size_t line);
# define nghttp3_mem_free2(FREE_FUNC, PTR, USER_DATA) \
nghttp3_mem_free2_debug((FREE_FUNC), (PTR), (USER_DATA), __func__, \
__FILE__, __LINE__)
void *nghttp3_mem_calloc_debug(const nghttp3_mem *mem, size_t nmemb,
size_t size, const char *func, const char *file,
size_t line);
# define nghttp3_mem_calloc(MEM, NMEMB, SIZE) \
nghttp3_mem_calloc_debug((MEM), (NMEMB), (SIZE), __func__, __FILE__, \
__LINE__)
void *nghttp3_mem_realloc_debug(const nghttp3_mem *mem, void *ptr, size_t size,
const char *func, const char *file,
size_t line);
# define nghttp3_mem_realloc(MEM, PTR, SIZE) \
nghttp3_mem_realloc_debug((MEM), (PTR), (SIZE), __func__, __FILE__, \
__LINE__)
#endif /* defined(MEMDEBUG) */
#endif /* !defined(NGHTTP3_MEM_H) */
vendor/nghttp3-1.18.0/lib/nghttp3_qpack.c view on Meta::CPAN
* WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
#include "nghttp3_qpack.h"
#include <string.h>
#include <assert.h>
#include <stdio.h>
#include "nghttp3_str.h"
#include "nghttp3_macro.h"
#include "nghttp3_debug.h"
#include "nghttp3_unreachable.h"
/* NGHTTP3_QPACK_MAX_QPACK_STREAMS is the maximum number of concurrent
nghttp3_qpack_stream object to handle a client which never cancel
or acknowledge header block. After this limit, encoder stops using
dynamic table. */
#define NGHTTP3_QPACK_MAX_QPACK_STREAMS 2000
/* Make scalar initialization form of nghttp3_qpack_static_entry */
#define MAKE_STATIC_ENT(I, T, H) \
vendor/nghttp3-1.18.0/lib/nghttp3_qpack.c view on Meta::CPAN
void nghttp3_qpack_encoder_unblock_stream(nghttp3_qpack_encoder *encoder,
nghttp3_qpack_stream *stream) {
nghttp3_blocked_streams_key bsk = {
.max_cnt = nghttp3_struct_of(nghttp3_pq_top(&stream->max_cnts),
nghttp3_qpack_header_block_ref, max_cnts_pe)
->max_cnt,
.id = (uint64_t)stream->stream_id,
};
nghttp3_ksl_it it;
/* This is purely debugging purpose only */
it = nghttp3_ksl_lower_bound(&encoder->blocked_streams, &bsk);
assert(!nghttp3_ksl_it_end(&it));
assert(nghttp3_ksl_it_get(&it) == stream);
nghttp3_ksl_remove_hint(&encoder->blocked_streams, NULL, &it, &bsk);
}
void nghttp3_qpack_encoder_unblock(nghttp3_qpack_encoder *encoder,
uint64_t max_cnt) {
vendor/nghttp3-1.18.0/lib/nghttp3_qpack.h view on Meta::CPAN
* :macro:`NGHTTP3_ERR_NOMEM`
* Out of memory.
* :macro:`NGHTTP3_ERR_QPACK_DECODER_STREAM_ERROR`
* |n| is too large.
*/
int nghttp3_qpack_encoder_add_icnt(nghttp3_qpack_encoder *encoder, uint64_t n);
/*
* `nghttp3_qpack_encoder_cancel_stream` tells |encoder| that stream
* denoted by |stream_id| is cancelled. This function is provided for
* debugging purpose only. In HTTP/3, |encoder| knows this by reading
* decoder stream with `nghttp3_qpack_encoder_read_decoder()`.
*/
void nghttp3_qpack_encoder_cancel_stream(nghttp3_qpack_encoder *encoder,
int64_t stream_id);
/*
* nghttp3_qpack_context_dtable_get returns dynamic table entry whose
* absolute index is |absidx|. This function assumes that such entry
* exists.
*/