Convenience constructor for FastCGIHeader

This commit is contained in:
Ian Gulliver
2019-04-28 18:22:49 +00:00
parent 9d4f3241fe
commit 96a4468913
2 changed files with 10 additions and 14 deletions

View File

@@ -3,7 +3,13 @@
#include <arpa/inet.h>
struct FastCGIHeader {
uint8_t version;
FastCGIHeader(uint8_t type_in, uint16_t request_id, uint16_t content_length)
: type(type_in) {
SetRequestId(request_id);
SetContentLength(content_length);
}
uint8_t version = 1;
uint8_t type;
private:
uint16_t request_id_; // network byte order