'Why nghttp2_session_mem_recv does not call any callback? (language: C, library: nghttp2)
ssize_t readlen;
struct evbuffer *input = bufferevent_get_input(bev);
size_t datalen = evbuffer_get_length(input);
unsigned char *data = evbuffer_pullup(input, -1);
readlen = nghttp2_session_mem_recv(session, data, datalen);
if (readlen < 0) {
printf("Fatal error: %s\n", nghttp2_strerror((int)readlen));
return;
}
if (evbuffer_drain(input, (size_t)readlen) != 0) {
printf("Fatal error: evbuffer_drain failed\n");
return;
}
nghttp2_session_mem_recv function does not call any callback even though it has all the callbacks set and the result returned by it is a valid one (return 130 and datalen is also 130).
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
