Csilk 0.2.1
A lightweight, high-performance C HTTP web framework
Loading...
Searching...
No Matches
h2.h File Reference

HTTP/2 integration for csilk. More...

#include "server_internal.h"
Include dependency graph for h2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int csilk_h2_init_session (csilk_client_t *client)
 Initialize HTTP/2 session for a client connection.
 
int csilk_h2_process_data (csilk_client_t *client, const uint8_t *data, size_t len)
 Process incoming HTTP/2 data.
 
csilk_ctx_t * csilk_h2_get_or_create_stream (csilk_client_t *client, int32_t stream_id)
 Get an existing stream context or create a new one.
 
void csilk_h2_free_streams (csilk_client_t *client)
 Free all active HTTP/2 stream contexts for a client.
 

Detailed Description

HTTP/2 integration for csilk.

Function Documentation

◆ csilk_h2_free_streams()

void csilk_h2_free_streams ( csilk_client_t *  client)

Free all active HTTP/2 stream contexts for a client.

Parameters
clientThe client connection.

◆ csilk_h2_get_or_create_stream()

csilk_ctx_t * csilk_h2_get_or_create_stream ( csilk_client_t *  client,
int32_t  stream_id 
)

Get an existing stream context or create a new one.

Parameters
clientThe client connection.
stream_idThe HTTP/2 stream ID.
Returns
Pointer to the context, or NULL on failure.

◆ csilk_h2_init_session()

int csilk_h2_init_session ( csilk_client_t *  client)

Initialize HTTP/2 session for a client connection.

Parameters
clientThe client connection.
Returns
0 on success, < 0 on failure.

◆ csilk_h2_process_data()

int csilk_h2_process_data ( csilk_client_t *  client,
const uint8_t *  data,
size_t  len 
)

Process incoming HTTP/2 data.

Parameters
clientThe client connection.
dataThe incoming data buffer.
lenThe length of the incoming data.
Returns
0 on success, < 0 on failure.