forked from loafle/openapi-generator-original
[C++] [Pistache] Removed deprecated warnings (#3985)
* Removed deprecated warnings * Fix typo
This commit is contained in:
parent
8212e80d0e
commit
b5fb92d5a8
@ -13,11 +13,12 @@
|
||||
#include "{{classname}}Impl.h"{{/operations}}{{/apis}}{{/apiInfo}}
|
||||
|
||||
#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:
|
||||
@ -61,7 +62,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);
|
||||
|
||||
{{#apiInfo}}{{#apis}}{{#operations}}
|
||||
|
@ -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);
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user