Skip to content
master
Go to file
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
 
 
 
 
 
 
 
 
 
 

README.md

HPacker

A HPACK lib implemented in c++

Usage

#include "HPacker.h"
using namespace hpack;

HPacker::KeyValueVector headers;
headers.emplace_back(":authority", "www.google.com");
headers.emplace_back(":method", "GET");
headers.emplace_back(":path", "/");

uint8_t buf[1024];
HPacker hpe;
int ret = hpe.encode(headers, buf, sizeof(buf));
if (ret < 0) {
	printf("encode failed\n");
	return 1;
}
printf("encoded_len=%d\n", ret);

headers.clear();
HPacker hpd;
ret = hpd.decode(buf, ret, headers);
if (ret < 0) {
	printf("decode failed\n");
	return 1;
}
printf("decoded_len=%d\n", ret);

LICENSE

MIT

About

a HTTP2 HPACK implementation in C++

Topics

Resources

License

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.