magpie
Loading...
Searching...
No Matches
Nghttp2Callbacks.hpp
1#pragma once
2
3#include <nghttp2/nghttp2.h>
4#include <openssl/crypto.h>
5
6namespace magpie::application::_detail {
7
8extern nghttp2_ssize onSend(
9 nghttp2_session* sess,
10 const uint8_t* data,
11 size_t length,
12 int, void*
13);
14
15extern int onChunkRecv(
16 nghttp2_session *session,
17 uint8_t flags,
18 int32_t streamId,
19 const uint8_t *data,
20 size_t len,
21 void *user_data
22);
23
24extern int onHeaders(
25 nghttp2_session *session,
26 const nghttp2_frame *frame,
27 const uint8_t *name, size_t namelen,
28 const uint8_t *value, size_t valuelen,
29 uint8_t flags, void *
30);
31
32extern int onFrame(
33 nghttp2_session* sess,
34 const nghttp2_frame* frame,
35 void*
36);
37
38extern int onAlpnSelectProto(
39 SSL* ssl, const unsigned char** out,
40 unsigned char* outLen, const unsigned char* in,
41 unsigned int inLen, void* arg
42);
43
44extern int onClientHello(SSL* ssl, int* al, void* arg);
45
46extern int onStreamClose(
47 nghttp2_session *session,
48 int32_t stream_id,
49 uint32_t error_code,
50 void *user_data
51);
52
53}
54