[C++] [Pistache] Removed deprecated warnings (#3985)

* Removed deprecated warnings

* Fix typo
This commit is contained in:
sunn
2019-09-29 20:12:59 +02:00
committed by GitHub
parent 8212e80d0e
commit b5fb92d5a8
2 changed files with 10 additions and 6 deletions

View File

@@ -25,11 +25,12 @@
#include "UserApiImpl.h"
#define PISTACHE_SERVER_THREADS 2
#define PISTACHE_SERVER_MAX_PAYLOAD 32768
#define PISTACHE_SERVER_MAX_REQUEST_SIZE 32768
#define PISTACHE_SERVER_MAX_RESPONSE_SIZE 32768
static Pistache::Http::Endpoint *httpEndpoint;
#ifdef __linux__
static void sigHandler(int sig){
static void sigHandler [[noreturn]] (int sig){
switch(sig){
case SIGINT:
case SIGQUIT:
@@ -73,7 +74,8 @@ int main() {
auto opts = Pistache::Http::Endpoint::options()
.threads(PISTACHE_SERVER_THREADS);
opts.flags(Pistache::Tcp::Options::ReuseAddr);
opts.maxPayload(PISTACHE_SERVER_MAX_PAYLOAD);
opts.maxRequestSize(PISTACHE_SERVER_MAX_REQUEST_SIZE);
opts.maxResponseSize(PISTACHE_SERVER_MAX_RESPONSE_SIZE);
httpEndpoint->init(opts);