A Fast and Easy to use microframework for the web.

Overview

A Fast and Easy to use microframework for the web.

Build Status Coverage Status Documentation Gitter Open Collective

Description

Crow is a C++ microframework for running web services. It uses routing similar to Python's Flask which makes it easy to use. It is also extremely fast, beating multiple existing C++ frameworks as well as non C++ frameworks.

Features

  • Easy Routing (similar to flask).
  • Type-safe Handlers.
  • Blazingly fast (see this benchmark and this benchmark).
  • Built in JSON support.
  • Mustache based templating library (crow::mustache).
  • Header only library (single header file available).
  • Middleware support for extensions.
  • HTTP/1.1 and Websocket support.
  • Multi-part request and response support.
  • Uses modern C++ (11/14)

Still in development

Documentation

Available here.

Examples

Hello World

#define CROW_MAIN
#include "crow.h"

int main()
{
    crow::SimpleApp app;

    CROW_ROUTE(app, "/")([](){
        return "Hello world";
    });

    app.port(18080).multithreaded().run();
}

JSON Response

CROW_ROUTE(app, "/json")
([]{
    crow::json::wvalue x({{"message", "Hello, World!"}});
    x["message2"] = "Hello, World.. Again!";
    return x;
});

Arguments

CROW_ROUTE(app,"/hello/<int>")
([](int count){
    if (count > 100)
        return crow::response(400);
    std::ostringstream os;
    os << count << " bottles of beer!";
    return crow::response(os.str());
});

Handler arguments type check at compile time

// Compile error with message "Handler type is mismatched with URL paramters"
CROW_ROUTE(app,"/another/<int>")
([](int a, int b){
    return crow::response(500);
});

Handling JSON Requests

CROW_ROUTE(app, "/add_json")
.methods("POST"_method)
([](const crow::request& req){
    auto x = crow::json::load(req.body);
    if (!x)
        return crow::response(400);
    int sum = x["a"].i()+x["b"].i();
    std::ostringstream os;
    os << sum;
    return crow::response{os.str()};
});

More examples can be found here.

Setting Up / Building

Available here.

Disclaimer

CrowCpp/Crow is a project based on ipkn/crow. Neither CrowCpp, it's members, or this project have been associated with, or endorsed or supported by ipkn (Jaeseung Ha) in any way. We do use ipkn/crow's source code under the BSD-3 clause license and sometimes refer to the public comments available on the github repository. But we do not in any way claim to be associated with or in contact with ipkn (Jaeseung Ha) regarding CrowCpp or CrowCpp/Crow

Attributions

Crow has incorporated the following libraries into its source.

http-parser (used for converting http strings to crow::request objects)

https://github.com/nodejs/http-parser

http_parser.c is based on src/http/ngx_http_parse.c from NGINX copyright
Igor Sysoev.

Additional changes are licensed under the same terms as NGINX and
copyright Joyent, Inc. and other Node contributors. All rights reserved.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE. 


qs_parse (used for reading query string parameters)

https://github.com/bartgrantham/qs_parse

Copyright (c) 2010 Bart Grantham
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.


TinySHA1 (used during the websocket handshake, not for security)

https://github.com/mohaps/TinySHA1

TinySHA1 - a header only implementation of the SHA1 algorithm. Based on the
implementation in boost::uuid::details

Copyright (c) 2012-22 SAURAV MOHAPATRA [email protected]
Permission to use, copy, modify, and distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright 
notice and this permission notice appear in all copies.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
PERFORMANCE OF THIS SOFTWARE.
Comments
  • error: 'z_stream' was not declared in this scope

    error: 'z_stream' was not declared in this scope

    Hello I'm having trouble integrating crow in my system program. I previously used crow no issues in a standalone program I built with -lpthread -lboost_system -lz. Now with static building it has introduced these compiler errors:

    The only difference I'm imagining is the addition of building with jemmaloc and a different version of boost?

    Any help would be greatly appreciated!

    root@f6c760e66602:/home/expo/resilientdb# make
    g++ -c -Wall -g -gdwarf-3 -std=c++0x -rdynamic  -I. -I./benchmarks -I./client/ -I./transport -I./system -I./statistics -I./blockchain -I./smart_contracts  -I./data_structures -Ideps/jemalloc-5.1.0/include -Ideps/nng-1.3.2/include -Ideps/boost_1_76_0 -Ideps/crypto -I./db -Ideps/sqlite-autoconf-3290000/build/include  -D NOGRAPHITE=1 -Werror -Wno-sizeof-pointer-memaccess  -o obj/client_main.o client/client_main.cpp
    In file included from client/client_main.cpp:17:0:
    client/../deps/crow_all.h: In function 'std::__cxx11::string crow::compression::compress_string(const string&, crow::compression::algorithm)':
    client/../deps/crow_all.h:6835:13: error: 'z_stream' was not declared in this scope
                 z_stream stream{};
                 ^~~~~~~~
    client/../deps/crow_all.h:6835:13: note: suggested alternative: 'nng_stream'
                 z_stream stream{};
                 ^~~~~~~~
                 nng_stream
    client/../deps/crow_all.h:6837:19: error: '::deflateInit2' has not been declared
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                       ^~~~~~~~~~~~
    client/../deps/crow_all.h:6837:33: error: 'stream' was not declared in this scope
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                     ^~~~~~
    client/../deps/crow_all.h:6837:33: note: suggested alternative: 'strcat'
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                     ^~~~~~
                                     strcat
    client/../deps/crow_all.h:6837:41: error: 'Z_DEFAULT_COMPRESSION' was not declared in this scope
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                             ^~~~~~~~~~~~~~~~~~~~~
    client/../deps/crow_all.h:6837:41: note: suggested alternative: '_DEFAULT_SOURCE'
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                             ^~~~~~~~~~~~~~~~~~~~~
                                             _DEFAULT_SOURCE
    client/../deps/crow_all.h:6837:64: error: 'Z_DEFLATED' was not declared in this scope
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                                                    ^~~~~~~~~~
    client/../deps/crow_all.h:6837:64: note: suggested alternative: 'DEFLATE'
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                                                    ^~~~~~~~~~
                                                                    DEFLATE
    client/../deps/crow_all.h:6837:85: error: 'Z_DEFAULT_STRATEGY' was not declared in this scope
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEG
    ) == Z_OK)
                                                                                         ^~~~~~~~~~~~~~~~~
    client/../deps/crow_all.h:6837:85: note: suggested alternative: '_DEFAULT_SOURCE'
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEG
    ) == Z_OK)
                                                                                         ^~~~~~~~~~~~~~~~~
                                                                                         _DEFAULT_SOURCE
    client/../deps/crow_all.h:6837:108: error: 'Z_OK' was not declared in this scope
       if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                                                                                      ^~~~
    client/../deps/crow_all.h:6837:108: note: suggested alternative: 'F_OK'
       if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                                                                                      ^~~~
    
         F_OK
    client/../deps/crow_all.h:6843:45: error: 'Bytef' does not name a type; did you mean 'byte'?
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                 ^~~~~
                                                 byte
    client/../deps/crow_all.h:6843:51: error: expected '>' before '*' token
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                       ^
    client/../deps/crow_all.h:6843:51: error: expected '(' before '*' token
    client/../deps/crow_all.h:6843:52: error: expected primary-expression before '>' token
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                        ^
    client/../deps/crow_all.h:6843:77: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                                                 ^~~~~
    client/../deps/crow_all.h:6843:77: error: expected '>' before 'Bytef'
    client/../deps/crow_all.h:6843:77: error: expected '(' before 'Bytef'
    client/../deps/crow_all.h:6843:77: error: 'Bytef' was not declared in this scope
    client/../deps/crow_all.h:6843:77: note: suggested alternative: 'byte'
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                                                 ^~~~~
                                                                                 byte
    client/../deps/crow_all.h:6843:84: error: expected primary-expression before '>' token
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                                                        ^
    client/../deps/crow_all.h:6843:99: error: expected ')' before ';' token
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                                                                       ^
    client/../deps/crow_all.h:6843:99: error: expected ')' before ';' token
    client/../deps/crow_all.h:6849:56: error: 'Bytef' does not name a type; did you mean 'byte'?
                         stream.next_out = reinterpret_cast<Bytef *>(&buffer[0]);
                                                            ^~~~~
                                                            byte
    client/../deps/crow_all.h:6849:62: error: expected '>' before '*' token
                         stream.next_out = reinterpret_cast<Bytef *>(&buffer[0]);
                                                                  ^
    client/../deps/crow_all.h:6849:62: error: expected '(' before '*' token
    client/../deps/crow_all.h:6849:63: error: expected primary-expression before '>' token
                         stream.next_out = reinterpret_cast<Bytef *>(&buffer[0]);
                                                                   ^
    client/../deps/crow_all.h:6849:76: error: expected ')' before ';' token
                         stream.next_out = reinterpret_cast<Bytef *>(&buffer[0]);
                                                                                ^
    client/../deps/crow_all.h:6851:30: error: '::deflate' has not been declared
                         code = ::deflate(&stream, Z_FINISH);
                                  ^~~~~~~
    client/../deps/crow_all.h:6851:30: note: suggested alternative: 'getdate'
                         code = ::deflate(&stream, Z_FINISH);
                                  ^~~~~~~
                                  getdate
    client/../deps/crow_all.h:6851:47: error: 'Z_FINISH' was not declared in this scope
                         code = ::deflate(&stream, Z_FINISH);
                                                   ^~~~~~~~
    client/../deps/crow_all.h:6851:47: note: suggested alternative: 'FINISH'
                         code = ::deflate(&stream, Z_FINISH);
                                                   ^~~~~~~~
                                                   FINISH
    client/../deps/crow_all.h:6853:49: error: 'Z_STREAM_END' was not declared in this scope
                         if (code == Z_OK || code == Z_STREAM_END)
                                                     ^~~~~~~~~~~~
    client/../deps/crow_all.h:6853:49: note: suggested alternative: '_ISTREAM_TCC'
                         if (code == Z_OK || code == Z_STREAM_END)
                                                     ^~~~~~~~~~~~
                                                     _ISTREAM_TCC
    client/../deps/crow_all.h:6860:29: error: 'Z_STREAM_END' was not declared in this scope
                     if (code != Z_STREAM_END)
                                 ^~~~~~~~~~~~
    client/../deps/crow_all.h:6860:29: note: suggested alternative: '_ISTREAM_TCC'
                     if (code != Z_STREAM_END)
                                 ^~~~~~~~~~~~
                                 _ISTREAM_TCC
    client/../deps/crow_all.h:6863:19: error: '::deflateEnd' has not been declared
                     ::deflateEnd(&stream);
                       ^~~~~~~~~~
    client/../deps/crow_all.h: In function 'std::__cxx11::string crow::compression::decompress_string(const string&)':
    client/../deps/crow_all.h:6872:13: error: 'Bytef' was not declared in this scope
                 Bytef tmp[8192];
                 ^~~~~
    client/../deps/crow_all.h:6872:13: note: suggested alternative: 'byte'
                 Bytef tmp[8192];
                 ^~~~~
                 byte
    client/../deps/crow_all.h:6874:13: error: 'z_stream' was not declared in this scope
                 z_stream zstream{};
                 ^~~~~~~~
    client/../deps/crow_all.h:6874:13: note: suggested alternative: 'nng_stream'
                 z_stream zstream{};
                 ^~~~~~~~
                 nng_stream
    client/../deps/crow_all.h:6875:13: error: 'zstream' was not declared in this scope
                 zstream.avail_in = deflated_string.size();
                 ^~~~~~~
    client/../deps/crow_all.h:6875:13: note: suggested alternative: 'strcat'
                 zstream.avail_in = deflated_string.size();
                 ^~~~~~~
                 strcat
    client/../deps/crow_all.h:6877:42: error: 'Bytef' does not name a type; did you mean 'byte'?
                 zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()));
                                              ^~~~~
                                              byte
    client/../deps/crow_all.h:6877:48: error: expected '>' before '*' token
                 zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()));
                                                    ^
    client/../deps/crow_all.h:6877:48: error: expected '(' before '*' token
    client/../deps/crow_all.h:6877:49: error: expected primary-expression before '>' token
                 zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()));
                                                     ^
    client/../deps/crow_all.h:6877:68: error: 'Bytef' does not name a type; did you mean 'byte'?
                 zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()));
                                                                        ^~~~~
                                                                        byte
    client/../deps/crow_all.h:6877:74: error: expected '>' before 'const'
                 zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()));
                                                                              ^~~~~
    client/../deps/crow_all.h:6877:74: error: expected '(' before 'const'
    client/../deps/crow_all.h:6877:74: error: expected primary-expression before 'const'
    client/../deps/crow_all.h:6877:74: error: expected ')' before 'const'
    client/../deps/crow_all.h:6877:74: error: expected ')' before 'const'
    client/../deps/crow_all.h:6877:108: error: expected ')' before ';' token
           zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()))
    
    client/../deps/crow_all.h:6879:19: error: '::inflateInit2' has not been declared
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                       ^~~~~~~~~~~~
    client/../deps/crow_all.h:6879:19: note: suggested alternative: 'inflated_string'
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                       ^~~~~~~~~~~~
                       inflated_string
    client/../deps/crow_all.h:6879:42: error: 'MAX_WBITS' was not declared in this scope
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                                              ^~~~~~~~~
    client/../deps/crow_all.h:6879:42: note: suggested alternative: 'GAI_WAIT'
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                                              ^~~~~~~~~
                                              GAI_WAIT
    client/../deps/crow_all.h:6879:61: error: 'Z_OK' was not declared in this scope
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                                                                 ^~~~
    client/../deps/crow_all.h:6879:61: note: suggested alternative: 'F_OK'
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                                                                 ^~~~
                                                                 F_OK
    client/../deps/crow_all.h:6883:48: error: 'tmp' was not declared in this scope
                         zstream.avail_out = sizeof(tmp);
                                                    ^~~
    client/../deps/crow_all.h:6883:48: note: suggested alternative: 'tcp'
                         zstream.avail_out = sizeof(tmp);
                                                    ^~~
                                                    tcp
    client/../deps/crow_all.h:6886:34: error: '::inflate' has not been declared
                         auto ret = ::inflate(&zstream, Z_NO_FLUSH);
                                      ^~~~~~~
    client/../deps/crow_all.h:6886:34: note: suggested alternative: 'iface'
                         auto ret = ::inflate(&zstream, Z_NO_FLUSH);
                                      ^~~~~~~
                                      iface
    client/../deps/crow_all.h:6886:52: error: 'Z_NO_FLUSH' was not declared in this scope
                         auto ret = ::inflate(&zstream, Z_NO_FLUSH);
                                                        ^~~~~~~~~~
    client/../deps/crow_all.h:6886:52: note: suggested alternative: 'NOFLSH'
                         auto ret = ::inflate(&zstream, Z_NO_FLUSH);
                                                        ^~~~~~~~~~
                                                        NOFLSH
    client/../deps/crow_all.h:6887:47: error: 'Z_STREAM_END' was not declared in this scope
                         if (ret == Z_OK || ret == Z_STREAM_END)
                                                   ^~~~~~~~~~~~
    client/../deps/crow_all.h:6887:47: note: suggested alternative: '_ISTREAM_TCC'
                         if (ret == Z_OK || ret == Z_STREAM_END)
                                                   ^~~~~~~~~~~~
                                                   _ISTREAM_TCC
    client/../deps/crow_all.h:6901:19: error: '::inflateEnd' has not been declared
                     ::inflateEnd(&zstream);
                       ^~~~~~~~~~
    Makefile:79: recipe for target 'obj/client_main.o' failed
    make: *** [obj/client_main.o] Error 1
    root@f6c760e66602:/home/expo/resilientdb# make
    g++ -c -Wall -g -gdwarf-3 -std=c++0x -rdynamic  -I. -I./benchmarks -I./client/ -I./transport -I./system -I./statistics -I./blockchain -I./smart_contracts  -I./data_structures -Ideps/jemalloc-5.1.0/include -Ideps/nng-1.3.2/include -Ideps/boost_1_76_0 -Ideps/crypto -I./db -Ideps/sqlite-autoconf-3290000/build/include  -D NOGRAPHITE=1 -Werror -Wno-sizeof-pointer-memaccess  -o obj/client_main.o client/client_main.cpp
    In file included from client/client_main.cpp:17:0:
    client/../deps/crow_all.h: In function 'std::__cxx11::string crow::compression::compress_string(const string&, crow::compression::algorithm)':
    client/../deps/crow_all.h:6835:13: error: 'z_stream' was not declared in this scope
                 z_stream stream{};
                 ^~~~~~~~
    client/../deps/crow_all.h:6835:13: note: suggested alternative: 'nng_stream'
                 z_stream stream{};
                 ^~~~~~~~
                 nng_stream
    client/../deps/crow_all.h:6837:19: error: '::deflateInit2' has not been declared
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                       ^~~~~~~~~~~~
    client/../deps/crow_all.h:6837:33: error: 'stream' was not declared in this scope
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                     ^~~~~~
    client/../deps/crow_all.h:6837:33: note: suggested alternative: 'strcat'
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                     ^~~~~~
                                     strcat
    client/../deps/crow_all.h:6837:41: error: 'Z_DEFAULT_COMPRESSION' was not declared in this scope
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                             ^~~~~~~~~~~~~~~~~~~~~
    client/../deps/crow_all.h:6837:41: note: suggested alternative: '_DEFAULT_SOURCE'
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                             ^~~~~~~~~~~~~~~~~~~~~
                                             _DEFAULT_SOURCE
    client/../deps/crow_all.h:6837:64: error: 'Z_DEFLATED' was not declared in this scope
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                                                    ^~~~~~~~~~
    client/../deps/crow_all.h:6837:64: note: suggested alternative: 'DEFLATE'
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                                                    ^~~~~~~~~~
                                                                    DEFLATE
    client/../deps/crow_all.h:6837:85: error: 'Z_DEFAULT_STRATEGY' was not declared in this scope
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEG
    ) == Z_OK)
                                                                                         ^~~~~~~~~~~~~~~~~
    client/../deps/crow_all.h:6837:85: note: suggested alternative: '_DEFAULT_SOURCE'
                 if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEG
    ) == Z_OK)
                                                                                         ^~~~~~~~~~~~~~~~~
                                                                                         _DEFAULT_SOURCE
    client/../deps/crow_all.h:6837:108: error: 'Z_OK' was not declared in this scope
       if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                                                                                      ^~~~
    client/../deps/crow_all.h:6837:108: note: suggested alternative: 'F_OK'
       if (::deflateInit2(&stream, Z_DEFAULT_COMPRESSION, Z_DEFLATED, algo, 8, Z_DEFAULT_STRATEGY) == Z_OK)
                                                                                                      ^~~~
    
         F_OK
    client/../deps/crow_all.h:6843:45: error: 'Bytef' does not name a type; did you mean 'byte'?
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                 ^~~~~
                                                 byte
    client/../deps/crow_all.h:6843:51: error: expected '>' before '*' token
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                       ^
    client/../deps/crow_all.h:6843:51: error: expected '(' before '*' token
    client/../deps/crow_all.h:6843:52: error: expected primary-expression before '>' token
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                        ^
    client/../deps/crow_all.h:6843:77: error: ISO C++ forbids declaration of 'type name' with no type [-fpermissive]
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                                                 ^~~~~
    client/../deps/crow_all.h:6843:77: error: expected '>' before 'Bytef'
    client/../deps/crow_all.h:6843:77: error: expected '(' before 'Bytef'
    client/../deps/crow_all.h:6843:77: error: 'Bytef' was not declared in this scope
    client/../deps/crow_all.h:6843:77: note: suggested alternative: 'byte'
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                                                 ^~~~~
                                                                                 byte
    client/../deps/crow_all.h:6843:84: error: expected primary-expression before '>' token
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                                                        ^
    client/../deps/crow_all.h:6843:99: error: expected ')' before ';' token
                     stream.next_in = const_cast<Bytef *>(reinterpret_cast<const Bytef *>(str.c_str()));
                                                                                                       ^
    client/../deps/crow_all.h:6843:99: error: expected ')' before ';' token
    client/../deps/crow_all.h:6849:56: error: 'Bytef' does not name a type; did you mean 'byte'?
                         stream.next_out = reinterpret_cast<Bytef *>(&buffer[0]);
                                                            ^~~~~
                                                            byte
    client/../deps/crow_all.h:6849:62: error: expected '>' before '*' token
                         stream.next_out = reinterpret_cast<Bytef *>(&buffer[0]);
                                                                  ^
    client/../deps/crow_all.h:6849:62: error: expected '(' before '*' token
    client/../deps/crow_all.h:6849:63: error: expected primary-expression before '>' token
                         stream.next_out = reinterpret_cast<Bytef *>(&buffer[0]);
                                                                   ^
    client/../deps/crow_all.h:6849:76: error: expected ')' before ';' token
                         stream.next_out = reinterpret_cast<Bytef *>(&buffer[0]);
                                                                                ^
    client/../deps/crow_all.h:6851:30: error: '::deflate' has not been declared
                         code = ::deflate(&stream, Z_FINISH);
                                  ^~~~~~~
    client/../deps/crow_all.h:6851:30: note: suggested alternative: 'getdate'
                         code = ::deflate(&stream, Z_FINISH);
                                  ^~~~~~~
                                  getdate
    client/../deps/crow_all.h:6851:47: error: 'Z_FINISH' was not declared in this scope
                         code = ::deflate(&stream, Z_FINISH);
                                                   ^~~~~~~~
    client/../deps/crow_all.h:6851:47: note: suggested alternative: 'FINISH'
                         code = ::deflate(&stream, Z_FINISH);
                                                   ^~~~~~~~
                                                   FINISH
    client/../deps/crow_all.h:6853:49: error: 'Z_STREAM_END' was not declared in this scope
                         if (code == Z_OK || code == Z_STREAM_END)
                                                     ^~~~~~~~~~~~
    client/../deps/crow_all.h:6853:49: note: suggested alternative: '_ISTREAM_TCC'
                         if (code == Z_OK || code == Z_STREAM_END)
                                                     ^~~~~~~~~~~~
                                                     _ISTREAM_TCC
    client/../deps/crow_all.h:6860:29: error: 'Z_STREAM_END' was not declared in this scope
                     if (code != Z_STREAM_END)
                                 ^~~~~~~~~~~~
    client/../deps/crow_all.h:6860:29: note: suggested alternative: '_ISTREAM_TCC'
                     if (code != Z_STREAM_END)
                                 ^~~~~~~~~~~~
                                 _ISTREAM_TCC
    client/../deps/crow_all.h:6863:19: error: '::deflateEnd' has not been declared
                     ::deflateEnd(&stream);
                       ^~~~~~~~~~
    client/../deps/crow_all.h: In function 'std::__cxx11::string crow::compression::decompress_string(const string&)':
    client/../deps/crow_all.h:6872:13: error: 'Bytef' was not declared in this scope
                 Bytef tmp[8192];
                 ^~~~~
    client/../deps/crow_all.h:6872:13: note: suggested alternative: 'byte'
                 Bytef tmp[8192];
                 ^~~~~
                 byte
    client/../deps/crow_all.h:6874:13: error: 'z_stream' was not declared in this scope
                 z_stream zstream{};
                 ^~~~~~~~
    client/../deps/crow_all.h:6874:13: note: suggested alternative: 'nng_stream'
                 z_stream zstream{};
                 ^~~~~~~~
                 nng_stream
    client/../deps/crow_all.h:6875:13: error: 'zstream' was not declared in this scope
                 zstream.avail_in = deflated_string.size();
                 ^~~~~~~
    client/../deps/crow_all.h:6875:13: note: suggested alternative: 'strcat'
                 zstream.avail_in = deflated_string.size();
                 ^~~~~~~
                 strcat
    client/../deps/crow_all.h:6877:42: error: 'Bytef' does not name a type; did you mean 'byte'?
                 zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()));
                                              ^~~~~
                                              byte
    client/../deps/crow_all.h:6877:48: error: expected '>' before '*' token
                 zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()));
                                                    ^
    client/../deps/crow_all.h:6877:48: error: expected '(' before '*' token
    client/../deps/crow_all.h:6877:49: error: expected primary-expression before '>' token
                 zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()));
                                                     ^
    client/../deps/crow_all.h:6877:68: error: 'Bytef' does not name a type; did you mean 'byte'?
                 zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()));
                                                                        ^~~~~
                                                                        byte
    client/../deps/crow_all.h:6877:74: error: expected '>' before 'const'
                 zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()));
                                                                              ^~~~~
    client/../deps/crow_all.h:6877:74: error: expected '(' before 'const'
    client/../deps/crow_all.h:6877:74: error: expected primary-expression before 'const'
    client/../deps/crow_all.h:6877:74: error: expected ')' before 'const'
    client/../deps/crow_all.h:6877:74: error: expected ')' before 'const'
    client/../deps/crow_all.h:6877:108: error: expected ')' before ';' token
           zstream.next_in = const_cast<Bytef *>(reinterpret_cast<Bytef const *>(deflated_string.c_str()))
    
    client/../deps/crow_all.h:6879:19: error: '::inflateInit2' has not been declared
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                       ^~~~~~~~~~~~
    client/../deps/crow_all.h:6879:19: note: suggested alternative: 'inflated_string'
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                       ^~~~~~~~~~~~
                       inflated_string
    client/../deps/crow_all.h:6879:42: error: 'MAX_WBITS' was not declared in this scope
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                                              ^~~~~~~~~
    client/../deps/crow_all.h:6879:42: note: suggested alternative: 'GAI_WAIT'
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                                              ^~~~~~~~~
                                              GAI_WAIT
    client/../deps/crow_all.h:6879:61: error: 'Z_OK' was not declared in this scope
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                                                                 ^~~~
    client/../deps/crow_all.h:6879:61: note: suggested alternative: 'F_OK'
                 if (::inflateInit2(&zstream, MAX_WBITS | 32) == Z_OK)
                                                                 ^~~~
                                                                 F_OK
    client/../deps/crow_all.h:6883:48: error: 'tmp' was not declared in this scope
                         zstream.avail_out = sizeof(tmp);
                                                    ^~~
    client/../deps/crow_all.h:6883:48: note: suggested alternative: 'tcp'
                         zstream.avail_out = sizeof(tmp);
                                                    ^~~
                                                    tcp
    client/../deps/crow_all.h:6886:34: error: '::inflate' has not been declared
                         auto ret = ::inflate(&zstream, Z_NO_FLUSH);
                                      ^~~~~~~
    client/../deps/crow_all.h:6886:34: note: suggested alternative: 'iface'
                         auto ret = ::inflate(&zstream, Z_NO_FLUSH);
                                      ^~~~~~~
                                      iface
    client/../deps/crow_all.h:6886:52: error: 'Z_NO_FLUSH' was not declared in this scope
                         auto ret = ::inflate(&zstream, Z_NO_FLUSH);
                                                        ^~~~~~~~~~
    client/../deps/crow_all.h:6886:52: note: suggested alternative: 'NOFLSH'
                         auto ret = ::inflate(&zstream, Z_NO_FLUSH);
                                                        ^~~~~~~~~~
                                                        NOFLSH
    client/../deps/crow_all.h:6887:47: error: 'Z_STREAM_END' was not declared in this scope
                         if (ret == Z_OK || ret == Z_STREAM_END)
                                                   ^~~~~~~~~~~~
    client/../deps/crow_all.h:6887:47: note: suggested alternative: '_ISTREAM_TCC'
                         if (ret == Z_OK || ret == Z_STREAM_END)
                                                   ^~~~~~~~~~~~
                                                   _ISTREAM_TCC
    client/../deps/crow_all.h:6901:19: error: '::inflateEnd' has not been declared
                     ::inflateEnd(&zstream);
                       ^~~~~~~~~~
    Makefile:79: recipe for target 'obj/client_main.o' failed
    make: *** [obj/client_main.o] Error 1
    
    opened by alejandroarmas 22
  • Installing Crow

    Installing Crow

    With the work on vcpkg and different Linux package managers, Crow can now be installed rather than just included in the downstream project.

    The idea has often been to just use crow_all.h which probably works for small projects, but I'm not sure about larger ones, since a larger project might want to use certain components in one source file and not others. (I might be wrong here and a single header is all that is actually needed, please correct me if so)

    So the first question is: Should crow by default be installed as a set of header files or just the single header file?

    This will shape how the documentation and releases are made moving forward.

    task 
    opened by The-EDev 21
  • build failed about ASIO_ASSERT

    build failed about ASIO_ASSERT

    Sorry sir, I'm a rookie again. I just installed the standalone version of ASIO as you said last time and rebuild it according to the website. https://crowcpp.org/master/getting_started/setup/linux/

    Environment: ubuntu 20.04.1 gcc 9.4.0 asio 1.18.1

    Sorry,I haven't used anything about boost before.

    I tried many times to search for a lot of related instructions, but it didn't work out.The error is as follows:


    In file included from /usr/include/c++/9/cassert:44, from /usr/local/include/asio/detail/assert.hpp:23, from /usr/local/include/asio/execution/any_executor.hpp:21, from /usr/local/include/asio/execution.hpp:19, from /usr/local/include/asio/system_executor.hpp:20, from /usr/local/include/asio/associated_executor.hpp:22, from /usr/local/include/asio.hpp:19, from /usr/local/include/crow/socket_adaptors.h:3, from /usr/local/include/crow.h:7, from main.cpp:1: /usr/local/include/asio/detail/buffered_stream_storage.hpp: In member function ‘void asio::detail::buffered_stream_storage::resize(asio::detail::buffered_stream_storage::size_type)’: /usr/local/include/asio/detail/buffered_stream_storage.hpp:81:5: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘crow::__assert_fail’? 81 | ASIO_ASSERT(length <= capacity()); | ^~~~~~~~~~~ In file included from /usr/local/include/crow/http_parser_merged.h:191, from /usr/local/include/crow.h:3, from main.cpp:1: /usr/include/assert.h:69:13: note: ‘crow::__assert_fail’ declared here 69 | extern void __assert_fail (const char *__assertion, const char *__file, | ^~~~~~~~~~~~~ In file included from /usr/include/c++/9/cassert:44, from /usr/local/include/asio/detail/assert.hpp:23, from /usr/local/include/asio/execution/any_executor.hpp:21, from /usr/local/include/asio/execution.hpp:19, from /usr/local/include/asio/system_executor.hpp:20, from /usr/local/include/asio/associated_executor.hpp:22, from /usr/local/include/asio.hpp:19, from /usr/local/include/crow/socket_adaptors.h:3, from /usr/local/include/crow.h:7, from main.cpp:1: /usr/local/include/asio/detail/buffered_stream_storage.hpp: In member function ‘void asio::detail::buffered_stream_storage::consume(asio::detail::buffered_stream_storage::size_type)’: /usr/local/include/asio/detail/buffered_stream_storage.hpp:104:5: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘crow::assert_fail’? 104 | ASIO_ASSERT(begin_offset + count <= end_offset); | ^~~~~~~~~~~ In file included from /usr/local/include/crow/http_parser_merged.h:191, from /usr/local/include/crow.h:3, from main.cpp:1: /usr/include/assert.h:69:13: note: ‘crow::__assert_fail’ declared here 69 | extern void __assert_fail (const char *__assertion, const char *__file, | ^~~~~~~~~~~~~ In file included from /usr/include/c++/9/cassert:44, from /usr/local/include/asio/detail/assert.hpp:23, from /usr/local/include/asio/execution/any_executor.hpp:21, from /usr/local/include/asio/execution.hpp:19, from /usr/local/include/asio/system_executor.hpp:20, from /usr/local/include/asio/associated_executor.hpp:22, from /usr/local/include/asio.hpp:19, from /usr/local/include/crow/socket_adaptors.h:3, from /usr/local/include/crow.h:7, from main.cpp:1: /usr/local/include/asio/detail/posix_event.hpp: In instantiation of ‘void asio::detail::posix_event::signal_all(Lock&) [with Lock = asio::detail::conditionally_enabled_mutex::scoped_lock]’: /usr/local/include/asio/detail/conditionally_enabled_event.hpp:56:29: required from here /usr/local/include/asio/detail/posix_event.hpp:56:5: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘crow::__assert_fail’? 56 | ASIO_ASSERT(lock.locked()); | ^~~~~~~~~~~ In file included from /usr/local/include/crow/http_parser_merged.h:191, from /usr/local/include/crow.h:3, from main.cpp:1: /usr/include/assert.h:69:13: note: ‘crow::__assert_fail’ declared here 69 | extern void __assert_fail (const char *__assertion, const char *__file, | ^~~~~~~~~~~~~ In file included from /usr/include/c++/9/cassert:44, from /usr/local/include/asio/detail/assert.hpp:23, from /usr/local/include/asio/execution/any_executor.hpp:21, from /usr/local/include/asio/execution.hpp:19, from /usr/local/include/asio/system_executor.hpp:20, from /usr/local/include/asio/associated_executor.hpp:22, from /usr/local/include/asio.hpp:19, from /usr/local/include/crow/socket_adaptors.h:3, from /usr/local/include/crow.h:7, from main.cpp:1: /usr/local/include/asio/detail/posix_event.hpp: In instantiation of ‘void asio::detail::posix_event::unlock_and_signal_one(Lock&) [with Lock = asio::detail::conditionally_enabled_mutex::scoped_lock]’: /usr/local/include/asio/detail/conditionally_enabled_event.hpp:64:40: required from here /usr/local/include/asio/detail/posix_event.hpp:66:5: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘crow::__assert_fail’? 66 | ASIO_ASSERT(lock.locked()); | ^~~~~~~~~~~ In file included from /usr/local/include/crow/http_parser_merged.h:191, from /usr/local/include/crow.h:3, from main.cpp:1: /usr/include/assert.h:69:13: note: ‘crow::__assert_fail’ declared here 69 | extern void __assert_fail (const char *__assertion, const char *__file, | ^~~~~~~~~~~~~ In file included from /usr/include/c++/9/cassert:44, from /usr/local/include/asio/detail/assert.hpp:23, from /usr/local/include/asio/execution/any_executor.hpp:21, from /usr/local/include/asio/execution.hpp:19, from /usr/local/include/asio/system_executor.hpp:20, from /usr/local/include/asio/associated_executor.hpp:22, from /usr/local/include/asio.hpp:19, from /usr/local/include/crow/socket_adaptors.h:3, from /usr/local/include/crow.h:7, from main.cpp:1: /usr/local/include/asio/detail/posix_event.hpp: In instantiation of ‘bool asio::detail::posix_event::maybe_unlock_and_signal_one(Lock&) [with Lock = asio::detail::conditionally_enabled_mutex::scoped_lock]’: /usr/local/include/asio/detail/conditionally_enabled_event.hpp:80:53: required from here /usr/local/include/asio/detail/posix_event.hpp:90:5: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘crow::__assert_fail’? 90 | ASIO_ASSERT(lock.locked()); | ^~~~~~~~~~~ In file included from /usr/local/include/crow/http_parser_merged.h:191, from /usr/local/include/crow.h:3, from main.cpp:1: /usr/include/assert.h:69:13: note: ‘crow::__assert_fail’ declared here 69 | extern void __assert_fail (const char *__assertion, const char *__file, | ^~~~~~~~~~~~~ In file included from /usr/include/c++/9/cassert:44, from /usr/local/include/asio/detail/assert.hpp:23, from /usr/local/include/asio/execution/any_executor.hpp:21, from /usr/local/include/asio/execution.hpp:19, from /usr/local/include/asio/system_executor.hpp:20, from /usr/local/include/asio/associated_executor.hpp:22, from /usr/local/include/asio.hpp:19, from /usr/local/include/crow/socket_adaptors.h:3, from /usr/local/include/crow.h:7, from main.cpp:1: /usr/local/include/asio/detail/posix_event.hpp: In instantiation of ‘void asio::detail::posix_event::clear(Lock&) [with Lock = asio::detail::conditionally_enabled_mutex::scoped_lock]’: /usr/local/include/asio/detail/conditionally_enabled_event.hpp:89:24: required from here /usr/local/include/asio/detail/posix_event.hpp:105:5: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘crow::__assert_fail’? 105 | ASIO_ASSERT(lock.locked()); | ^~~~~~~~~~~ In file included from /usr/local/include/crow/http_parser_merged.h:191, from /usr/local/include/crow.h:3, from main.cpp:1: /usr/include/assert.h:69:13: note: ‘crow::__assert_fail’ declared here 69 | extern void __assert_fail (const char *__assertion, const char *__file, | ^~~~~~~~~~~~~ In file included from /usr/include/c++/9/cassert:44, from /usr/local/include/asio/detail/assert.hpp:23, from /usr/local/include/asio/execution/any_executor.hpp:21, from /usr/local/include/asio/execution.hpp:19, from /usr/local/include/asio/system_executor.hpp:20, from /usr/local/include/asio/associated_executor.hpp:22, from /usr/local/include/asio.hpp:19, from /usr/local/include/crow/socket_adaptors.h:3, from /usr/local/include/crow.h:7, from main.cpp:1: /usr/local/include/asio/detail/posix_event.hpp: In instantiation of ‘void asio::detail::posix_event::wait(Lock&) [with Lock = asio::detail::conditionally_enabled_mutex::scoped_lock]’: /usr/local/include/asio/detail/conditionally_enabled_event.hpp:96:23: required from here /usr/local/include/asio/detail/posix_event.hpp:114:5: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘crow::__assert_fail’? 114 | ASIO_ASSERT(lock.locked()); | ^~~~~~~~~~~ In file included from /usr/local/include/crow/http_parser_merged.h:191, from /usr/local/include/crow.h:3, from main.cpp:1: /usr/include/assert.h:69:13: note: ‘crow::__assert_fail’ declared here 69 | extern void __assert_fail (const char *__assertion, const char *__file, | ^~~~~~~~~~~~~ In file included from /usr/include/c++/9/cassert:44, from /usr/local/include/asio/detail/assert.hpp:23, from /usr/local/include/asio/execution/any_executor.hpp:21, from /usr/local/include/asio/execution.hpp:19, from /usr/local/include/asio/system_executor.hpp:20, from /usr/local/include/asio/associated_executor.hpp:22, from /usr/local/include/asio.hpp:19, from /usr/local/include/crow/socket_adaptors.h:3, from /usr/local/include/crow.h:7, from main.cpp:1: /usr/local/include/asio/detail/posix_event.hpp: In instantiation of ‘bool asio::detail::posix_event::wait_for_usec(Lock&, long int) [with Lock = asio::detail::conditionally_enabled_mutex::scoped_lock]’: /usr/local/include/asio/detail/conditionally_enabled_event.hpp:106:45: required from here /usr/local/include/asio/detail/posix_event.hpp:127:5: error: ‘__assert_fail’ was not declared in this scope; did you mean ‘crow::__assert_fail’? 127 | ASIO_ASSERT(lock.locked()); | ^~~~~~~~~~~ In file included from /usr/local/include/crow/http_parser_merged.h:191, from /usr/local/include/crow.h:3, from main.cpp:1: /usr/include/assert.h:69:13: note: ‘crow::__assert_fail’ declared here 69 | extern void __assert_fail (const char *__assertion, const char *__file,

    bug 
    opened by doraemon-hub-art 17
  • HTTP server not recieving any messages after some time

    HTTP server not recieving any messages after some time

    I have implemented a HTTP server with single POST method handling. testing the same with jmeter with 600 users.

    after some time the server does not receive any requests, kind of gets stuck. the maximum connection limit on my server is host is good enough. and after restarting the jmeter it again kind of stops after some time.

    when its not receiving any messages i see i have 600 connections in established state( as testing with 600 users from jmeter)

    Any idea what I could be missing?

    bug 
    opened by gsp26 17
  • Compilation Errors

    Compilation Errors

    I'm having a small issue with the latest project using vcpkg on windows. I get the following compilation errors.

    1>I:\vcpkg\installed\x64-windows\include\crow\json.h(749,47): error C2059: syntax error: '{' 1>I:\vcpkg\installed\x64-windows\include\crow\json.h(749,1): error C2143: syntax error: missing ';' before '{' 1>I:\vcpkg\installed\x64-windows\include\crow\json.h(749,1): error C2143: syntax error: missing ')' before ';' 1>I:\vcpkg\installed\x64-windows\include\crow\json.h(749,64): error C2059: syntax error: '&&' 1>I:\vcpkg\installed\x64-windows\include\crow\json.h(750,1): error C2143: syntax error: missing ';' before '{' 1>I:\vcpkg\installed\x64-windows\include\crow\json.h(750,62): error C2059: syntax error: '&&' 1>I:\vcpkg\installed\x64-windows\include\crow\json.h(751,1): error C2143: syntax error: missing ';' before '{' 1>I:\vcpkg\installed\x64-windows\include\crow\json.h(751,62): error C2059: syntax error: '&&' 1>I:\vcpkg\installed\x64-windows\include\crow\json.h(752,1): error C2143: syntax error: missing ';' before '{' 1>I:\vcpkg\installed\x64-windows\include\crow\json.h(752,1): error C2059: syntax error: ')'

    Any help would be much appreciated.

    bug further information required 
    opened by baylf2000 16
  • Websockets cause segfault when closing from server side

    Websockets cause segfault when closing from server side

    When I call crow::websocket::connection::close() server side, my application segfaults. Minimal example showing the problem I have:

    #include "crow.h"
    #include "crow/http_response.h"
    #include "crow/json.h"
    #include "crow/logging.h"
    #include "crow/routing.h"
    #include "crow/websocket.h"
    
    int main(int, char**)
    {
        crow::SimpleApp app;
    
        crow::websocket::connection* wsconn = nullptr;
    
        CROW_ROUTE(app, "/")([](const crow::request& req) {
            crow::response resp;
            resp.set_static_file_info("index.html");
            return resp;
        });
    
        CROW_ROUTE(app, "/ws").websocket()
            .onopen([&](crow::websocket::connection& conn) {
                wsconn = &conn;
            });
            .onclose([](crow::websocket::connection& conn, const std::string& reason) {
                CROW_LOG_INFO << reason;
            });
    
        CROW_ROUTE(app, "/disconnect")([&](const crow::request& req) {
            if(wsconn) {
                wsconn->close();
                wsconn = nullptr;
            }
            return crow::response(200);
        });
    
        app.port(18080).multithreaded().run();
    
        return 0;
    }
    

    index.html used:

    <!DOCTYPE HTML>
    <html>
    <head>
      <meta charset="UTF-8">
      <title>Main</title>
    </head>
    <body>
    <button type="button" onclick="disconnect()">Disconnect</button>
    <script>
        var ws = new WebSocket("ws://localhost:18080/ws");
    
        function disconnect() {
            var req = new XMLHttpRequest();
            req.open("GET", "http://localhost:18080/disconnect", false);
            req.send(null);
        }
    </script>
    </body>
    </html>
    

    So the frontend opens a websocket and when the disconnect-button is clicked, the server should close it. I guess, I am doing something wrong, besides multiple connections cannot be handled in this example :) The onclose()-handler is called, I get reason logged. And then segfault.

    bug 
    opened by MichaelSB 15
  • Change the following project settings:Multiple Headers,Single Headers

    Change the following project settings:Multiple Headers,Single Headers

    Hello ,

    Could you explain how to change these in xcode ? I read on the web that It means to make #include "(path to boost)" but it does not work.

    It would be a lot better if you could do a yt video tutorial.

    thx in advance

    question 
    opened by Daviddbalaban 14
  • SSL connect error

    SSL connect error

    Hi, I am using Crow for a webapp I am working on, together with libquickmail to send emails. Libquickmail works just fine on it's own, but whenever I use it in the Crow app it crashes.

    Respectively, I have a function in a shared library that sends an email. When I link that .so from a non-Crow program, all works fine, but when I link it from the Crow app, it either crashes (if not in a CROW_ROUTE macro; the program jsut returns -1 with no additional errors), or throws an SSL connect error (if used in the CROW_ROUTE macro).

    SSL connect error: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to [SMTP SERVER ADDRESS]

    The email function itself doesn't change, and neither does the server address/login details. Is there anything in Crow that could be causing this to happen? So far, I've tried testing if it could be multi-threading (doesn't seem to be an issue), and loading from a .so (which also isn't an issue in a non-Crow app), but I am slightly running out of ideas. Libquickmail uses cURL, if that is significant.

    I'd be very grateful for any advice, please ask if you need any more details

    bug 
    opened by 0XPW87 13
  • Using Code::Blocks IDE

    Using Code::Blocks IDE

    I understand that Visual Studio is supported on Windows using VCPKG. However, I cannot seem to find any documentation on what is required to be able to build using Code::Blocks. Is there any documentation or pointers that can be provided?

    question 
    opened by m1c999 13
  • Example using Crow with Google Charts?

    Example using Crow with Google Charts?

    Thank you for your excellent work! I have run your Hello World example successfully.

    I would like to use Crow to plot XY-plots of sensor data in a web browser, i.e. time series. I have C++ libraries to access the data.

    I see 2 possibilities. Either produce a PNG image on the server and show it in the browser, or better pass the time series data to the client side and plot it using Google Charts. My question is whether an example exists showing a Crow application returning data to Google Charts?

    question 
    opened by arnholm 13
  • Sending file to crow backend

    Sending file to crow backend

    Hello!

    I am trying to send a file (any extension) to a backend crow server.

    I am using this piece of code and somehow files don't have the same SHA hash. In Visual Studio I have set to C++17 and Character Set to Use Multi-Byte Character Set.

    CROW_ROUTE(app, "/file").methods("POST"_method) ([](const crow::request& req){
    		crow::multipart::message msg(req);
    		
    		auto filepath = msg.parts[0].body;
    		auto file = msg.parts[1].body;
    
    		auto file_handler = std::ofstream(filepath);
    		file_handler << file;
    
    		file_handler.close();
    
    		return crow::response(200, "Ok");
    		});
    

    What am I doing wrong?

    image

    Thank you!

    bug 
    opened by mihdim777 13
Releases(v1.0+5)
  • v1.0+5(Aug 24, 2022)

  • v1.0+4(Jun 28, 2022)

  • v1.0+3(May 7, 2022)

  • v1.0+2(Apr 29, 2022)

    • Bug Fixed issue where Crow would not Compile on GCC 4.8 (due to a G++ bug). #399
    • Bug Fixed exception when Crow doesn't know the extension of a static file. @danielskeenan #411
    • Bug Fixed issue where Crow wouldn't compile when using CROW_MIDDLEWARES with a pass-by-reference app. #396
    • Feature Allow using absolute file paths with static folders. @joelguittet #419
    • Bug Fixed issue where SSL websockets wouldn't run due to HTTP upgrade. @jeanbiber #393
    • Bug Fixed issue where Logs from multiple threads would be merged together. @dhchen #404
    • Bug Fixed issue where responses to OPTIONS requests were missing a Content-Length header. @jeanbiber #424
    • Feature Allow setting up HTTPS using SSL chain files. @jeanbiber #424
    • Doxygen can now document SSL and Compression parts. #424
    • Typo fixes. @stephanecharette #424
    Source code(tar.gz)
    Source code(zip)
    crow-v1.0+2.deb(83.56 KB)
    crow-v1.0+2.tar.gz(82.29 KB)
    crow_all.h(430.53 KB)
  • v1.0+1(Mar 30, 2022)

  • v1.0(Mar 29, 2022)

    With this release, Crow is production ready. I'm amazed and thankful for how far this project has come and I would like to thank everyone who contributed their time, skills, and money to move this project forward.

    A special thanks to Crow's newest member, @luca-schlecker. Without his work, much of this release wouldn't be possible.

    Packages / Dependencies

    • Proper CMake support (Crow is now a CMake target (library) as opposed to just using CMake to compile examples/tests). #228 #209 #218 #241
    • Change Crow CMake dependencies based on downstream project requirements. @Leon0402 #231
    • CMake install support. #228 #209 #218
    • Crow can now be compiled using C++20. @Leon0402 #265
    • Automated release process via release script. #162 #205 #228 #252
    • CMake uninstall support. @navidcity #305
    • Fixed local VCPKG manifest version. #207
    • Fixed vcpkg.json to work on linux. @Borwe #330
    • Added Crow license to crow_all.h. #165

    Framework

    • Feature Allowed multiple source files for projects using Crow without the need for #define CROW_MAIN. #280 #186 @danielytics #192 @nekoffski #354
    • Feature Added a type of middleware that runs per route rather than globally. @dranikpg #327
    • Feature Replaced dumb_timer_queue with new task_timer. #278
    • Feature Replaced the round robin approach to assigning connections to threads to a load balancing system. @belugum #289
    • Feature Improved and optimize filename sanitization function. @neumannt #321
    • Feature Added Middleware to handle CORS rules. @dranikpg #348
    • Bug fixed issue where absolute unix paths were not sanitized. #334
    • Feature Added function to run the Crow app asynchronously. #359
    • Feature Added unsafe file loading functions. @zefrenchy #339
    • Feature Added Base64 decoder. #260 @neumannt #324
    • Feature Added function to get the port Crow is using. @nx10 #276
    • Bug Worked around GCC 8.3 bug that prevented Crow from compiling. @nx10 @CircuitCoder #287
    • Feature Updated Crow's thread count process to reflect the actual number of threads being used. #307

    Websockets

    • Bug Fixed Issue where Crow assumes a single masked message means all other messages are masked as well. #282
    • Feature Enforce Websocket protocol (opt-in). #282
    • Feature Added functionality to get the remote IP address connected to the Websocket. #263

    HTTP

    • Feature Implemented Blueprints for project organization (similar to Flask's Blueprints). #181 #205 #208 #242
    • Feature Upgraded, better integrated, and optimized the HTTP Parser Crow uses. #294 @navidcity #303 #349 @nekoffski #354 #371
    • Feature Re-implemented the Trie crow uses to match rules with URLs. #166
    • Bug Fixed problem where streaming a response would abruptly close the connection. #332
    • Feature Crow now uses an enum for HTTP status codes (200 or status::OK can be used). #230
    • Feature Added several HTTP status codes. @Zhavok92 #227 @kingster #367
    • Bug Fixed issue where enabling SSL but not using it caused incorrect redirects. #281
    • Feature Added app option to set threshold beyond which Crow streams a response. #245
    • Feature Catch-all Routes now have receive the error code in their response object. #205
    • Bug API Breaking Modified Parser to only allow GET method on HTTP/0.9. #262
    • Bug Fixed problem where static file info wasn't being cleared if no file was found. #338
    • Feature Added Automatic UTF-8 support through a middleware. #202
    • Feature Added content type constructor for response. @hg333 #212
    • Bug Replaced HTTPMethod::GET with HTTPMethod::Get in routing.h. @d35ha #191
    • Feature Recognized cleartext and SSL versions of HTTP/2 upgrade header. #332
    • API Breaking Fixed incorrect styling in for remote_ip_address. @himanshu007-creator #200

    Multipart

    • Feature API Breaking Part headers are now in a map rather than a vector. #358
    • Feature Added function to get a part by name. #358
    • Bug Fixed a problem where Crow failed to parse a multipart request made using .Net HttpClient. #332
    • Feature API Breaking Added a boundary to the default content-type (gets set to the request's boundary if constructed from a request). #358
    • Feature Parts and headers can be cast to integer or double. #358

    Mustache

    • Feature Added support for C++ lambdas in Mustache. #299
    • Feature API Breaking Added function to set a templates directory. #362
    • Bug Fixed missing ; in mustache escaping. #342
    • Feature API Breaking returning page.render() from a route now sets Content-Type header to HTML. #346
    • Bug Ensured const correctness in template_t. @neumannt #325

    JSON

    • Feature JSON values can now be initialized using initializer lists. @lcsdavid #190 #203 #242
    • Bug Fixed problem where JSON would output nan or inf values. @Vhuynh25 @rremigius #328
    • Bug Fixed problem with excess recursion when reading JSON. @neumannt #326
    • Bug Made JSON float output faster and more accurate. #203

    Logging

    • Feature API Breaking Simplified creating a custom logger. #288 #290
    • Feature Added Support for using local time in default logger. @kingster #368

    Documentation

    • Added Landing Page. #197 #201 #228
    • Updated Site theme. #197 #228
    • Placed financial and code contributors on landing page. #228 #311 #373
    • Updated install documentation and separated instructions for different OSes. #228 #238 #293
    • Added Social media cards. #197 #203 #270
    • Added donate button to site header. #197
    • Added indicator for features introduced after v0.1. #197
    • Added HTTP Authentication tutorial. #293
    • Updated documentation to mention new features. #203 #228 #372
    • Made API reference more readable by removing parts only intended for internal use. #372
    • Improved visibility on readme gitter badge. #228
    • Fixed several typos. #297
    • Used proper markdown syntax in documentation. #270

    CI/CD

    • Fixed issue where cpp-coveralls wasn't compatible with newer GCOV versions. #228
    • Fixed issue where PR coverage would affect master coverage results. #228
    • Fixed coveralls branch. #198
    • Removed pip3 command from PR workflow. #270

    Testing / Examples

    • Examples can now compile on Windows. #209
    • Tests can now compile without CROW_ENABLE_COMPRESSION being defined. #209
    • Added Tests for HTTPS (SSL) version of Crow. #228 #130
    • Bug Fixed issue where the response stream test would randomly fail. #234
    • Tests now use Debug build (debug flags + without optimization). #228
    • Added unit test for server timeout. #277
    • Updated catch2 to v2.13.8. @neumannt #322
    • Added tests for content type constructor for response. @hg333 #213
    • Updated examples and tests to include JSON initializer lists. #190 #203
    • Fixed typo in example_with_all.cpp. @odeits #161

    Other

    • Created a new logo. #172
    • Updated Crow License. #172 #228
    • Formatted framework source code using Crow's own clang-format rules (and created a bot to enforce the rules for all PRs). #286 #293
    Source code(tar.gz)
    Source code(zip)
    crow-v1.0.deb(83.49 KB)
    crow-v1.0.tar.gz(82.22 KB)
    crow_all.h(429.02 KB)
  • v0.3+4(Jan 12, 2022)

    This release fixes major problems in Crow, from a potential memory leak to a few security vulnerabilities. Everyone using v0.3 is advised to update to this version as soon as possible.

    This will most likely be the last update to v0.3 as we prepare for the next release.

    • Bug Data leak when sending static files. #292
    • Bug Incorrect handling of signal handlers. @mcopik #296
    • Bug crow::json escapes UTF-8 characters above value 127. @mosolovsa #304
    • Bug Path Traversal and Content Injection exploits patched. @snyk Team #317
    Source code(tar.gz)
    Source code(zip)
    crow-v0.3+4.deb(57.08 KB)
    crow_all.h(376.11 KB)
  • v0.3+3(Oct 15, 2021)

    This release fixes a few issues experienced mainly on windows. Note: While Crow did receive an updated build / release system, it isn't included in this release due to our desire to retain backwards compatibility. You can expect the new system to be in full effect with the next minor/major release.

    • Bug JSON strings not correctly dumped on Microsoft Windows with Multi Byte Character Set encoding. @lcsdavid #196
    • Bug Unresolved conversion warning fix. @lcsdavid #174
    • Updated All logos.
    Source code(tar.gz)
    Source code(zip)
    crow-v0.3+3.deb(56.89 KB)
    crow_all.h(372.64 KB)
  • v0.3+2(Jul 5, 2021)

  • v0.3+1(Jun 28, 2021)

  • v0.3(Jun 5, 2021)

    This version feels almost mature enough to where I would call it v1.0. But due to lack of production environment testing, it will stay v0.3

    I'm hoping to be able to add hotfixes for any bugs unseen or necessary fixes.

    Thanks to every single person who contributed to this project! I hope I didn't forget to mention any of you.

    Here are the changes:

    Packages / Dependencies

    • CMake Improvements (for better compatibility with Conan recipes). @madduci, @prince-chrismc, and The Conan team. #96
    • Vcpkg Support. @thinking-tower #137
    • Fix CMake problem when Crow is built in a subdirectory of another project. @rittelle #103
    • More CMake Fixes. @ugermann #124
    • Crow can now be installed on the system using make install. @ayaankhan98 #80

    Websockets

    • Bug Reset the internal header variable before every read. (fixing potential issues where read is run and no actual data is taken from the socket). #44
    • Bug Fixed potential crash when using SSL Websockets. @fran6co #44
    • Feature Added support for non masked client messages. #44
    • Feature Added functionality to send a ping message from the server. #44
    • Feature Exposed methods to send Ping and Pong to the end-user. #44
    • Feature Ping and Pong payloads to be larger than 127 bytes are now allowed. #44

    HTTP

    • Feature Added Support for HTTP Compression using Zlib. @pierobot #93
    • Feature Made Compression (and Zlib dependency) optional (via macro). @alejandroarmas #142
    • Bug Fixed broken Static files due to Responses not being cleared. @rittelle #109
    • Feature Added Catch-all Route. @Tibbel #122 #126
    • Feature Users can now define anything they want a handler to return using the returnable class. #84
    • Feature Crow handler can now have Response alone as an argument (without Request). @ayaankhan98 @klaus-moon #76
    • Feature Server name can now be set to anything the User wants. @makaveli #79
    • Feature More robust redirection tools. #87
    • Feature methods pop(), pop_list(), pop_dict(), and keys() added to query_string. #132
    • Feature Crow now handles HEAD and OPTIONS HTTP methods automatically. #117
    • Bug Fixed issue where response is logged twice. #128

    Static Files

    • Feature Created static folder similar to flask. #50
    • Feature Static File support was enabled on Windows. @epajarre #55

    Mustache

    • Feature Crow logs a warning if a template is not found. @rittelle #102

    Json

    • Feature crow::json::wvalue can now return any Json type, not just Json objects. #70
    • Feature crow::json::wvalue can now use either std::unordered_map or std::map (for organized results). #132
    • Feature Added lo() method to json::rvalue, returns a vector of json::rvalue containing whatever a json object or list has. #132
    • Feature Added constructor to create crow::json::wvalue from std::vector. #132
    • Feature Added keys() method to json::rvalue. #132
    • Feature Added size() to crow::json::wvalue. #132
    • Feature Added std::string() operator to json::rvalue (allows std::string(json["abc"]). #132
    • dump() is now part of crow::json::wvalue and is const. #70 @belugum #135
    • Feature Added copy constructor to crow::json::wvalue. #132

    Documentation

    • Added Guides / Tutorials powered by mkdocs. #71 #72 #73 #74 #95 #132 @wentasah #134 @thinking-tower #137
    • Added in code documentation for most of the library. #65 #44 #61
    • Cleaned up a small problem with app.h documentation. #44
    • Small documentation error fix. @tibovanheule #114
    • Readme changes. #71

    CI/CD

    • Travis replaced with Drone.io. #120

    Testing / Examples

    • Added Websocket tests. #44
    • Added examples and tests for json and query_string new methods. #132
    • Bug #include for example_with_all. @supersaiyanmode #63
    • Bug Renamed CMake target: example -> basic_example. @supersaiyanmode #64
    • Bug Crow now reports the actual port from ASIO when running. @ChoppinBlockParty #119
    • Bug Mustache tests now included in coverage. #129

    Other

    • merge_all.py is now windows compatible. #58
    • Added CROW_MAIN Macro to avoid multiple definition error of static variables. @fckxorg #111 #118
    • Crow's signal handler is now optional. @NRizzoInc @ilejn #85
    • MSVC compatibility fixes. @sfinktah #101
    • Better Xcode Compatibility. @dspverden #139
    • Recast 64-bit size_t to 32-bit int to remove MSVC warnings. @sfinktah #106
    • uint was replaced with unsigned, improving compatibility. @epajarre #54
    • Middlewares are now in a subfolder rather than being on the same level as the core library. #51
    • Moved Repository under "CrowCpp" organization.
    Source code(tar.gz)
    Source code(zip)
    crow.deb(56.87 KB)
    crow_all.h(372.53 KB)
  • 0.2(Oct 31, 2020)

    The first release in almost 3 years. This update adds compatibility with the latest boost version, along with many additions and fixes:

    Packages / Dependencies

    • Minimum Boost version is now 1.7. #1
    • Removed Conanfile. #22

    Websockets

    • Bug Update websocket.h function "void do_read()". #2

    HTTP

    • Feature Static file support added (including automatic mime-type setting). #10
    • Feature Response streaming for large (larger than 1MB) response bodies added. #28 #33
    • Feature Multipart data support added. #15
    • Bug Fixed SSL reconnect issue #23
    • Bug Server now sends a shutdown signal to TCP sockets before closing the connection #23
    • Feature Added "405 method not allowed" error. #13
    • Feature Added method to set timeout #30

    Mustache

    • Feature Updated specification files. #22 #35

    Documentation

    • Added Doxygen to generate Reference. #7
    • Excluded 3rd Party libraries from Documentation. #20
    • Added documentation to app.h. #31

    CI/CD

    • Restarted Travis and coveralls for the repository. #12
    • Updated OS to Ubuntu focal (20.04.1 LTS). #12
    • Started testing on AMD64 and ARM64 CPUs. #24
    • Changed testing GCC (9.3 now) and clang (7.0 now) versions. #24
    • make and ctest now use 4 threads instead of 2. #24
    • Excluded 3rd Party libraries from Coveralls. #20

    Testing

    • Feature Tests now use Catch. #22

    Other

    • All Scripts are now in the /scripts directory
    • logo changes
    • readme changes
    Source code(tar.gz)
    Source code(zip)
    crow_all.h(337.51 KB)
Owner
Crow
A community effort to maintain Crow, a C++ microframework for the web.
Crow
A WiFi-enabled microcontroller capable of communicating with web-based service APIs for fast prototyping applications.

A WiFi-enabled microcontroller capable of communicating with web-based service APIs for fast prototyping applications.

Mark Hofmeister 2 Mar 9, 2022
Ole Christian Eidheim 741 Dec 27, 2022
An easy to use and powerful open source websocket library written in C.

libwebsock Easy to use C library for websockets This library allows for quick and easy development of applications that use the websocket protocol, wi

Jonathan Hall 47 Nov 13, 2022
Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!

Do you have a question that doesn't require you to open an issue? Join the gitter channel. If you use uvw and you want to say thanks or support the pr

Michele Caini 1.5k Jan 9, 2023
A high-performance and easy-to-use C++ network library.

pine A high-performance and easy-to-use C++ network library. Now this is just a toy library for education purpose, do not use in production. example A

Baroquer 80 Dec 30, 2022
Fast and easy C++ RESTful WebServices framework

ngrest ngrest is a simple C++ REST framework. It has small footprint, fast and very easy in use. ngrest allow you to deploy C++ RESTful webservices un

Dmitry 450 Dec 29, 2022
A collection of C++ HTTP libraries including an easy to use HTTP server.

Proxygen: Facebook's C++ HTTP Libraries This project comprises the core C++ HTTP abstractions used at Facebook. Internally, it is used as the basis fo

Facebook 7.7k Jan 4, 2023
Easy-to-use HTTP C library

LibHTTP LibHTTP is a C library easy-to-use which implements the base of the HTTP protocol. Info's about LibHTTP LibHTTP is an easy-to-use HTTP library

null 6 Dec 10, 2021
modern c++(c++17), cross-platform, header-only, easy to use http framework

cinatra--一个高效易用的c++ http框架 English | 中文 目录 使用cinatra常见问题汇总(FAQ) cinatra简介 如何使用 快速示例 性能测试 注意事项 roadmap 联系方式 cinatra简介 cinatra是一个高性能易用的http框架,它是用modern

qicosmos 1.4k Dec 30, 2022
Easy to use client modifications for old Roblox

RbxHooks Easy to use client modifications for old Roblox Hooks These describe the included hooks with RbxHooks, but you can also add your own! RbxHook

ORC Free and Open Source Software 20 Oct 25, 2022
modern C++(C++11), simple, easy to use rpc framework

modern C++(C++11), simple, easy to use rpc framework

qicosmos 1.2k Jan 4, 2023
Mongoose Embedded Web Server Library - a multi-protocol embedded networking library with TCP/UDP, HTTP, WebSocket, MQTT built-in protocols, async DNS resolver, and non-blocking API.

Mongoose - Embedded Web Server / Embedded Networking Library Mongoose is a networking library for C/C++. It implements event-driven non-blocking APIs

Cesanta Software 9k Jan 1, 2023
C library to create simple HTTP servers and Web Applications.

Onion http server library Travis status Coverity status Onion is a C library to create simple HTTP servers and Web Applications. master the developmen

David Moreno Montero 1.9k Dec 20, 2022
cServe : mean and lean web server written in c

cServe =========== cServe is a web server written in c for POXIS compliant operating systems cServe is planned to be [ ] Supporting HTTP/1.x and HTTP/

Ayush Kumar 1 Dec 21, 2021
reverse proxy with web server and preview page

Reverse Proxy Dependencies Go Make Suport Termux (android/afsd kernel) linux (kernel) Install: Termux: 1 step: Install Go-lang, Git and Make pkg insta

AlbâniaSecurity-RT 9 Dec 8, 2022
An asynchronous web framework for C++ built on top of Qt

!!! I can no longer maintain this project. If you're interessed, please contact me and I can move the projetct to you !!! Tufão - an asynchronous web

Vinícius dos Santos Oliveira 556 Dec 28, 2022
Simple, secure & standards compliant web server for the most demanding of applications

Simple, secure[1] & standards compliant[2] web server for the most demanding[3] of applications. Read more... ?? Optimized security Being meticulously

uNetworking AB 15k Dec 30, 2022
C Hypertext Library - A library for writing web applications in C

CHL C Hypertext Library - A library for writing web applications in C #include <chl/chl.h> int main() { chl_set_default_headers(); chl_print_header

null 271 Nov 14, 2022