Split off implementation

This commit is contained in:
Ian Gulliver
2019-04-28 18:24:25 +00:00
parent 96a4468913
commit ec73c5266d
3 changed files with 10 additions and 7 deletions

View File

@@ -1,5 +1,5 @@
example_simple: example_simple.o fastcgi.o fastcgi_conn.o fastcgi_request.o stream_buffer.o buffer.o
clang++ -std=gnu++2a -o example_simple example_simple.o fastcgi.o fastcgi_conn.o fastcgi_request.o stream_buffer.o buffer.o -lgflags -lglog -lpthread
example_simple: example_simple.o fastcgi.o fastcgi_conn.o fastcgi_request.o fastcgi_parse.o stream_buffer.o buffer.o
clang++ -std=gnu++2a -o example_simple example_simple.o fastcgi.o fastcgi_conn.o fastcgi_request.o fastcgi_parse.o stream_buffer.o buffer.o -lgflags -lglog -lpthread
clean:
rm --force exmaple_simple *.o

7
fastcgi_parse.cpp Normal file
View File

@@ -0,0 +1,7 @@
#include "fastcgi_parse.h"
FastCGIHeader::FastCGIHeader(uint8_t type_in, uint16_t request_id, uint16_t content_length)
: type(type_in) {
SetRequestId(request_id);
SetContentLength(content_length);
}

View File

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