🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.

Oat++ Logo

 

oatpp build status Language grade: C/C++ Join the chat at https://gitter.im/oatpp-framework/Lobby

Oat++

News

  • Hey, meet the new oatpp version 1.2.5! See the changelog for details.
  • Check out the new oatpp ORM - read more here.

Oat++ is a modern Web Framework for C++. It's fully loaded and contains all necessary components for effective production level development. It's also light and has a small memory footprint.

Start

About

Join Our Community

Quick Overview

Shortcuts:

Build Powerful API And Document It With Swagger-UI

See ApiController for more details.

ENDPOINT_INFO(getUserById) {
  info->summary = "Get one User by userId";

  info->addResponse<Object<UserDto>>(Status::CODE_200, "application/json");
  info->addResponse<Object<StatusDto>>(Status::CODE_404, "application/json");
  info->addResponse<Object<StatusDto>>(Status::CODE_500, "application/json");

  info->pathParams["userId"].description = "User Identifier";
}
ENDPOINT("GET", "users/{userId}", getUserById,
         PATH(Int32, userId))
{
  return createDtoResponse(Status::CODE_200, m_userService.getUserById(userId));
}

Access Databases And Keep Your Data Consistent

See Oat++ ORM for more details.

QUERY(createUser,
      "INSERT INTO users (username, email, role) VALUES (:username, :email, :role);",
      PARAM(oatpp::String, username), 
      PARAM(oatpp::String, email), 
      PARAM(oatpp::Enum<UserRoles>::AsString, role))

Frequently Asked Questions

Q: "Oat++" name?

  • "Oat" is something light, organic, and green. It can be easily cooked and consumed with no effort.
  • "++" gives a hint that it is "something" for C++.

Q: What is the main area of Oat++ application?

Oat++ is used for many different purposes, from building REST APIs that run on embedded devices to building microservices and highly-loaded cloud applications.

But the majority of use cases appears to be in IoT and Robotics.

Q: How portable is Oat++?

Theoretically, Oat++ can be easily ported everywhere where you have threads and network stack. With an additional comparably small effort, it can be ported almost everywhere depending on how much you strip it and what would be the final binary size.

See supported platforms for additional info.

Q: What is the size of a minimal Oat++ application?

About 1Mb, depending on C/C++ std-lib and oatpp version.

Q: Which Oat++ API to choose, Simple or Async?

Always choose Simple API wherever possible. Simple API is more developed and makes the code cleaner.

Async API is designed for small, specific tasks that run at high concurrency levels ex.:

  • Serving file downloads to a large number of concurrent users (1K users and more).
  • Streaming to a large number of clients (1K or more).
  • Websocket Chat servers.

For all other purposes use simple API.

Examples

REST-API

  • REST Service - A complete example of a "CRUD" service (UserService) built with Oat++. REST + Swagger-UI + SQLite.
  • REST Client - Example project of how-to use Retrofit-like client wrapper (ApiClient) and how it works.

WebSocket

  • Can Chat - Feature-complete rooms-based chat for tens of thousands users. Client plus Server.
  • WebSocket - Collection of oatpp WebSocket examples.
  • YUV Websocket Stream - Example project how-to create a YUV image stream from a V4L device (i.E. Webcam) using websockets.

Databases

  • SQLite - A complete example of a "CRUD" service. REST + Swagger-UI + SQLite.
  • PostgreSQL - Example of a production-grade entity service storing information in PostgreSQL. With Swagger-UI and configuration profiles.
  • MongoDB - Example project how to work with MongoDB using oatpp-mongo mondule. Project is a web-service with basic CRUD and Swagger-UI.

IoT

  • Example-IoT-Hue - Example project how-to create an Philips Hue compatible REST-API that is discovered and controllable by Hue compatible Smart-Home devices like Amazon Alexa or Google Echo.

Streaming

  • HTTP Live Streaming Server - Example project on how to build an HLS-streaming server using Oat++ asynchronous API.
  • YUV Websocket Stream - Example project how-to create a YUV image stream from a V4L device (i.E. Webcam) using websockets.

TLS

  • TLS With Libressl - Example project how-to setup secure connection and serve via HTTPS.

Microservices

Asynchronous API

  • Async Service - Example project on how to use asynchronous API to handle a large number of simultaneous connections.
Owner
Oat++
🌱Light and powerful C++ web framework for highly scalable and resource-efficient web applications development. It's zero-dependency and easy-portable.
Oat++
Comments
  • Integrate into existing application which uses libevent epoll

    Integrate into existing application which uses libevent epoll

    Hi All,

    We are looking to integrate a reset server into our existing application. I am looking for some pointers on the same. Please note we are already running our libevent epoll and want to handle with the same. Is this possible?

    rgds Balaji

  • Missing Atomic library

    Missing Atomic library

    Hello,

    I was able to cross-compile a simple API for Clang ARM. But when I run the executable I get the following error: ./{executable}: error while loading shared libraries: libatomic.so.1: cannot open shared object file: No such file or directory

    The GNU Atomic library is not supported for my target devices (compatibility problems with libraries delivered by chip manfacturer).

    I'm not sure but I think Atomic is only used for a spinlock in Oat++, correct me if I'm wrong. Would there be a sollution where I wouldn't have to use Atomic?

  • HttpRequest readBodyToString empty

    HttpRequest readBodyToString empty

    Hello

    I cannot get the bodystring of my HttpRequestExecutor response. it is always empty. (getStatusCode and getStatusDescription are working so I know that the request have been well executed) when I use oatpp::url it works fine but when I use HttpRequestExecutor it's empty.

    can you please help me find what am i doing wrong?

    I am expecting a json response from the called API.

    here my oattp HttpRequestExecutor declaration:

     std::shared_ptr<oatpp::web::client::RequestExecutor> createOatppExecutor() {
       auto config = oatpp::libressl::Config::createShared();
       tls_config_insecure_noverifycert(config->getTLSConfig());
       tls_config_insecure_noverifyname(config->getTLSConfig());
       auto connectionProvider = oatpp::libressl::client::ConnectionProvider::createShared(config, "monurl", 443);
       return oatpp::web::client::HttpRequestExecutor::createShared(connectionProvider);
     }
    

    my instanciation:

     auto objectMapper = oatpp::parser::json::mapping::ObjectMapper::createShared();
     //auto requestExecutor = createCurlExecutor();
     auto requestExecutor = createOatppExecutor();
     auto client = ApiClient::createShared(requestExecutor, objectMapper);
    

    my ApiClient function:

    API_CALL("GET", "mypath?myparameter={parameter}", doGettokeninfoheader,HEADER(String, myHeader1, "Content-type"),HEADER(String, myHeader2, "Accept"), PATH(String, parameter))
    

    and my call

    auto data3 = client->doGettokeninfoheader("application/x-www-form-urlencoded","application/json","PHOkrUhrhE-kz-ljWw5ci2SExSg");
    OATPP_LOGD("Api call", "string='%s'", data3->readBodyToString()->c_str());  --> empty when HttpRequestExecutor :-( 
    

    thanks for your help

  • oatpp::base::memory::MemoryPool::freeByEntryHeader()]: Invalid EntryHeader

    oatpp::base::memory::MemoryPool::freeByEntryHeader()]: Invalid EntryHeader

    Hi!

    I observe this exception when I'm stopping the application with OATPP:

    terminate called after throwing an instance of 'std::runtime_error'
      what():  [oatpp::base::memory::MemoryPool::freeByEntryHeader()]: Invalid EntryHeader
    

    I was able to get some more logs of it:

    2020-09-16T13:31:24.530436Z DBG 322058:src/log/oatpp_logger.hpp:20 [oatpp::base::memory::MemoryPool::freeByEntryHeader()]:Error. Invalid EntryHeader. Expected poolId=9803840, entry poolId=-1610486112
    

    Backtrace:

    (gdb) bt
    #0  0x00007f775e5e370f in raise () from /lib64/libc.so.6
    #1  0x00007f775e5cdb25 in abort () from /lib64/libc.so.6
    #2  0x00007f770a4fd06b in __gnu_cxx::__verbose_terminate_handler() [clone .cold.1] () from /lib64/libstdc++.so.6
    #3  0x00007f770a50350c in __cxxabiv1::__terminate(void (*)()) () from /lib64/libstdc++.so.6
    #4  0x00007f770a502529 in __cxa_call_terminate () from /lib64/libstdc++.so.6
    #5  0x00007f770a502ea8 in __gxx_personality_v0 () from /lib64/libstdc++.so.6
    #6  0x00007f770a265ad3 in _Unwind_RaiseException_Phase2 () from /lib64/libgcc_s.so.1
    #7  0x00007f770a266041 in _Unwind_RaiseException () from /lib64/libgcc_s.so.1
    #8  0x00007f770a5037bb in __cxa_throw () from /lib64/libstdc++.so.6
    #9  0x00007f770a985b5e in oatpp::base::memory::MemoryPool::freeByEntryHeader(oatpp::base::memory::MemoryPool::EntryHeader*) [clone .cold.96] () 
    #10 0x00007f770ab09aea in std::_Sp_counted_ptr_inplace<oatpp::collection::LinkedList<std::shared_ptr<oatpp::web::url::mapping::Pattern::Part> >, oatpp::base::memory::PoolSharedObjectAllocator<oatpp::collection::LinkedList<std::shared_ptr<oatpp::web::url::mapping::Pattern::Part> > >, (__gnu_cxx::_Lock_policy)2>::_M_dispose() ()
    #11 0x00007f770ab09ebf in oatpp::web::url::mapping::Pattern::~Pattern() ()
    #12 0x00007f770aaff249 in oatpp::web::url::mapping::Router<oatpp::web::server::HttpRequestHandler>::~Router() ()
    #13 0x00007f770aaff04e in oatpp::web::server::HttpRouter::~HttpRouter() ()
    #14 0x00007f770aa7e979 in std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x236b650) at /usr/include/c++/8/bits/shared_ptr_base.h:148
    #15 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release (this=0x236b650) at /usr/include/c++/8/bits/shared_ptr_base.h:148
    #16 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count (this=0x23a32c0, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:728
    #17 std::__shared_ptr<oatpp::web::server::HttpRouter, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr (this=0x23a32b8, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/shared_ptr_base.h:1167
    #18 std::shared_ptr<oatpp::web::server::HttpRouter>::~shared_ptr (this=0x23a32b8, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/shared_ptr.h:103
    #19 oatpp::base::Environment::Component<std::shared_ptr<oatpp::web::server::HttpRouter> >::~Component (this=0x23a3278, __in_chrg=<optimized out>)
        at /root/.conan/data/oatpp/1.1.0/_/_/package/56e0cf6d16ee57367a0661ab743f4e43b29223f8/include/oatpp-1.1.0/oatpp/oatpp/core/base/Environment.hpp:242
    #20 zroute::ServiceComponent::~ServiceComponent (this=0x23a3170, __in_chrg=<optimized out>)
    #21 std::default_delete<zroute::ServiceComponent>::operator() (this=0x23a4020, __ptr=0x23a3170) at /usr/include/c++/8/bits/unique_ptr.h:81
    #22 std::unique_ptr<zroute::ServiceComponent, std::default_delete<zroute::ServiceComponent> >::~unique_ptr (this=0x23a4020, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:269
    #23 zroute::HttpServer::~HttpServer (this=0x23a3f90, __in_chrg=<optimized out>)
    #24 0x00007f770a9ac001 in std::default_delete<zroute::HttpServer>::operator() (this=0x7f770e5299c0, __ptr=0x23a3f90) at /usr/include/c++/8/bits/unique_ptr.h:342
    #25 std::unique_ptr<zroute::HttpServer, std::default_delete<zroute::HttpServer> >::~unique_ptr (this=0x7f770e5299c0, __in_chrg=<optimized out>) at /usr/include/c++/8/bits/unique_ptr.h:269
    #26 zroute::core::~core (this=0x7f770e529910, __in_chrg=<optimized out>)
    #27 core_cleanup ()
    #28 0x00007f770a9a2eff in destroy () at inroute_mod.c:137
    #29 0x0000000000582a18 in destroy_modules () at core/sr_module.c:746
    #30 0x000000000041d53d in cleanup (show_status=1) at main.c:563
    #31 0x000000000041ed12 in shutdown_children (sig=15, show_status=1) at main.c:706
    #32 0x000000000041f800 in handle_sigs () at main.c:737
    #33 0x000000000042b465 in main_loop () at main.c:1817
    #34 0x0000000000433137 in main (argc=13, argv=0x7ffd84f9ea78) at main.c:2856
    

    The issue started to occur after I added 2nd controller. There was no such issue with single controller.

    OATPP version is 1.1.0

    After I disabled pool allocation the issue doesn't reproduce anymore:

    --- a/CMakeLists.txt
    +++ b/CMakeLists.txt
    @@ -26,7 +26,7 @@ option(OATPP_BUILD_TESTS "Create test target for oat++" ON)
     ###################################################################################################
    .
     option(OATPP_DISABLE_ENV_OBJECT_COUNTERS "Disable object counting for Release builds for better performance" OFF)
    -option(OATPP_DISABLE_POOL_ALLOCATIONS "This will make oatpp::base::memory::MemoryPool, method obtain and free call new and delete directly" OFF)
    +option(OATPP_DISABLE_POOL_ALLOCATIONS "This will make oatpp::base::memory::MemoryPool, method obtain and free call new and delete directly" ON)
    .
     set(OATPP_THREAD_HARDWARE_CONCURRENCY "AUTO" CACHE STRING "Predefined value for function oatpp::concurrency::Thread::getHardwareConcurrency()")
     set(OATPP_THREAD_DISTRIBUTED_MEM_POOL_SHARDS_COUNT "10" CACHE STRING "Number of shards of ThreadDistributedMemoryPool")
    

    Looks to be connected with https://github.com/oatpp/oatpp/issues/173

    Is this a bug at OATPP custom pool memory allocator?

    Thanks in advance.

  • The process hung up when trying to stop server

    The process hung up when trying to stop server

    I create a sub thread to run my server like this:

    thread_ptr_ = std::make_shared<std::thread>(&WebServer::StartService, this);
    

    This is my function to start server:

    WebServer::StartService() {
        Config& config = Config::GetInstance();
        std::string port;
        Status status;
    
        status = config.GetServerConfigWebPort(port);
        AppComponent components = AppComponent(std::stoi(port));
        SwaggerComponent swaggerComponent("192.168.1.57", std::stoi(port));
    
        /* create ApiControllers and add endpoints to router */
        auto router = components.http_router_.getObject();
    
        auto doc_endpoints = oatpp::swagger::AsyncController::Endpoints::createShared();
    
        auto user_controller = WebController::createShared();
        user_controller->addEndpointsToRouter(router);
    
        doc_endpoints->pushBackAll(user_controller->getEndpoints());
    
        auto swaggerController = oatpp::swagger::AsyncController::createShared(doc_endpoints);
        swaggerController->addEndpointsToRouter(router);
    
        /* create server */
        server_ptr_ = std::make_unique<oatpp::network::server::Server>(components.server_connection_provider_.getObject(),
                                                                       components.server_connection_handler_.getObject());
    
        // start synchronously
        server_ptr_->run();
    
        return Status::OK();
    }
    

    I try to stop my web server just to call Stop() like this:

    if (server_ptr_ != nullptr) {
            server_ptr_->stop();  // cStop server
        }
    
        if (thread_ptr_ != nullptr) {
            thread_ptr_->join();
            thread_ptr_ = nullptr;
        }
    

    I join web thread, and wait it finishing but the process hung up. How I protect it from hanging up?

    I use async endpoint, and my server connection provider is an object of SimpleTCPConnectionProvider

  • Won't build for iOS 8 or older

    Won't build for iOS 8 or older

    Hi @lganzzzo,

    I'm working on the iOS app version of the Android app that @dmcamens-legrand discussed with you recently. The oat++ library is working well on Android now, and I'm trying to make it work on iOS as well.

    Sadly, the even though the thread_local keyword was added to Xcode 8, it won't compile to devices running iOS 8 or earlier, even in the current version (Xcode 10).

    Do you have any ideas for how to use this library without using the thread_local storage functionality from C++11?

    Thank you!

  • Question about streaming possibility

    Question about streaming possibility

    Hello,

    I'm investigating this library and can't find the way how to implement file streaming with it.

    Let's assume huge file is stored in another storage, so I want to use own implementation of file stream, that implements (open/seek/read/write), which then can be used by a framework to get/send chunks of bytes to requestor of this file.

    Is this possible with the current state?

  • Linker errors in Visual Studio 2019

    Linker errors in Visual Studio 2019

    Hello, I've successfully compiled and installed the library on my Windows platform.

    I am trying to get it working in VS2019. I've added additional libraries in Configuration Properties->C/C++->Additional Include Directories. I added .lib directory to Configuration Properties->Linker->General->Additional Library Directories and I added individual .lib to Input->Additional Dependencies. But, I get the "unresolved external symbol" errors still.

    What am I missing?

  • Implementing Issue #408

    Implementing Issue #408

    I gave it a shot at implementing issue #408.

    I wasn't sure if the timeout parameter should be added to the get-function of core::provider::Provider or core::provider::PoolTemplate. I settled for the latter.

    I think I found a bug while writing the test: PoolTemplate::createShared calls PoolTemplate::startCleanupTask, which takes a parameter. Apperantly this function PoolTemplate::createShared was never called and since PoolTemplate is a template no compiler errors occurred. I fixed it by passing ptr to PoolTemplate::startCleanupTask.

  • Why does httpServer crash when it exits?

    Why does httpServer crash when it exits?

    std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release shared_ptr_base.h:155
    std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count shared_ptr_base.h:728
    std::__shared_ptr<oatpp::base::StrBuffer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr shared_ptr_base.h:1167
    std::shared_ptr<oatpp::base::StrBuffer>::~shared_ptr shared_ptr.h:103
    oatpp::data::mapping::type::ObjectWrapper<oatpp::base::StrBuffer, oatpp::data::mapping::type::__class::String>::~ObjectWrapper Type.hpp:97
    oatpp::data::mapping::type::String::~String Primitive.hpp:62
    oatpp::parser::json::mapping::Serializer::Config::~Config Serializer.hpp:49
    __gnu_cxx::new_allocator<oatpp::parser::json::mapping::Serializer::Config>::destroy<oatpp::parser::json::mapping::Serializer::Config> new_allocator.h:140
    std::allocator_traits<std::allocator<oatpp::parser::json::mapping::Serializer::Config> >::destroy<oatpp::parser::json::mapping::Serializer::Config> alloc_traits.h:487
    std::_Sp_counted_ptr_inplace<oatpp::parser::json::mapping::Serializer::Config, std::allocator<oatpp::parser::json::mapping::Serializer::Config>, (__gnu_cxx::_Lock_policy)2>::_M_dispose shared_ptr_base.h:554
    std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release shared_ptr_base.h:155
    std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count shared_ptr_base.h:728
    std::__shared_ptr<oatpp::parser::json::mapping::Serializer::Config, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr shared_ptr_base.h:1167
    std::shared_ptr<oatpp::parser::json::mapping::Serializer::Config>::~shared_ptr shared_ptr.h:103
    oatpp::parser::json::mapping::Serializer::~Serializer Serializer.hpp:38
    __gnu_cxx::new_allocator<oatpp::parser::json::mapping::Serializer>::destroy<oatpp::parser::json::mapping::Serializer> new_allocator.h:140
    std::allocator_traits<std::allocator<oatpp::parser::json::mapping::Serializer> >::destroy<oatpp::parser::json::mapping::Serializer> alloc_traits.h:487
    std::_Sp_counted_ptr_inplace<oatpp::parser::json::mapping::Serializer, std::allocator<oatpp::parser::json::mapping::Serializer>, (__gnu_cxx::_Lock_policy)2>::_M_dispose shared_ptr_base.h:554
    std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release shared_ptr_base.h:155
    std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count shared_ptr_base.h:728
    std::__shared_ptr<oatpp::parser::json::mapping::Serializer, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr shared_ptr_base.h:1167
    std::shared_ptr<oatpp::parser::json::mapping::Serializer>::~shared_ptr shared_ptr.h:103
    oatpp::parser::json::mapping::ObjectMapper::~ObjectMapper ObjectMapper.hpp:40
    __gnu_cxx::new_allocator<oatpp::parser::json::mapping::ObjectMapper>::destroy<oatpp::parser::json::mapping::ObjectMapper> new_allocator.h:140
    std::allocator_traits<std::allocator<oatpp::parser::json::mapping::ObjectMapper> >::destroy<oatpp::parser::json::mapping::ObjectMapper> alloc_traits.h:487
    std::_Sp_counted_ptr_inplace<oatpp::parser::json::mapping::ObjectMapper, std::allocator<oatpp::parser::json::mapping::ObjectMapper>, (__gnu_cxx::_Lock_policy)2>::_M_dispose shared_ptr_base.h:554
    std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release shared_ptr_base.h:155
    std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count shared_ptr_base.h:728
    std::__shared_ptr<oatpp::parser::json::mapping::ObjectMapper, (__gnu_cxx::_Lock_policy)2>::~__shared_ptr shared_ptr_base.h:1167
    std::shared_ptr<oatpp::parser::json::mapping::ObjectMapper>::~shared_ptr shared_ptr.h:103
    ...............
    __run_exit_handlers 0x00007f66df1d6d8c
    __GI_exit 0x00007f66df1d6eba
    __libc_start_main 0x00007f66df1c10a2
    _start 0x000000000084ecaa
    
  • BufferOutputStream::reserveBytesUpfront() is inefficient

    BufferOutputStream::reserveBytesUpfront() is inefficient

    I tried to upload a moderate volume of data via POST requests to an oatpp-based web service. The volume is: ~114MBytes/minute, it's ~20 requests/minute each ~5.7MBytes. However, oatpp in this case loads almost 100% of a Ryzen 7 PRO 3700 CPU with 16 logical cores. Profiling shows the following: oatpp_BufferOutputStream_reserveBytesUpfront The version of oatpp used is 1.0.0 . Is there a workaround for this bug, e.g. can I somehow make Request::readBodyToString() to allocate a large buffer at once so to eliminate the need for reallocation (e.g. make the buffer size equal to the size of the unencoded POST body)? Or maybe is there a way to increase the growth rate for the BufferOutputStream used?

  • Missing information about configuration parameters in documentation

    Missing information about configuration parameters in documentation

    There are some configuration parameters available in Config.hpp file, but appropriate page in documentation does not include any information about them.

    It would be nice to list them there, especially the information that some parameters are deprecated.

    https://github.com/oatpp/oatpp/blob/66e94ea869044b1e8c1bfe78bf2f29fb31605334/CMakeLists.txt#L69

    https://github.com/oatpp/oatpp/blob/66e94ea869044b1e8c1bfe78bf2f29fb31605334/CMakeLists.txt#L79

  • operator==(std::nullptr) is not const for some types

    operator==(std::nullptr) is not const for some types

    operator==(std::nullptr) is defined as const for some types (for example String) https://github.com/oatpp/oatpp/blob/6063b57b250bfa9bdf02c47351a4a4ce1a969079/src/oatpp/core/data/mapping/type/Primitive.hpp#L225

    But it isn't const for Enum, DTOWrapper and Primitive (and maybe for other types) https://github.com/oatpp/oatpp/blob/6063b57b250bfa9bdf02c47351a4a4ce1a969079/src/oatpp/core/data/mapping/type/Enum.hpp#L335 https://github.com/oatpp/oatpp/blob/6063b57b250bfa9bdf02c47351a4a4ce1a969079/src/oatpp/core/data/mapping/type/Object.hpp#L360 https://github.com/oatpp/oatpp/blob/6063b57b250bfa9bdf02c47351a4a4ce1a969079/src/oatpp/core/data/mapping/type/Primitive.hpp#L312

  • Conversion function for class Primitive may cause SEGFAUL

    Conversion function for class Primitive may cause SEGFAUL

    operator std::string() for class String prevents dereferencing nullptr. https://github.com/oatpp/oatpp/blob/6063b57b250bfa9bdf02c47351a4a4ce1a969079/src/oatpp/core/data/mapping/type/Primitive.hpp#L140

    But for class Primitive it may cause segmentation fault: https://github.com/oatpp/oatpp/blob/6063b57b250bfa9bdf02c47351a4a4ce1a969079/src/oatpp/core/data/mapping/type/Primitive.hpp#L355

    Is it intentional for some reason or should be fixed?

  • This function handleError has been [[deprecated]] in class ErrorHandler,isn't it?

    This function handleError has been [[deprecated]] in class ErrorHandler,isn't it?

    [[deprecated]] virtual std::shared_ptrprotocol::http::outgoing::Response handleError(const protocol::http::Status& status, const oatpp::String& message, const Headers& headers) = 0; https://github.com/oatpp/oatpp/blob/66e94ea869044b1e8c1bfe78bf2f29fb31605334/src/oatpp/web/server/handler/ErrorHandler.hpp#L107

  • How to go about some unnamed DTO fields

    How to go about some unnamed DTO fields

    Hello,

    so this is a question: I want to write an object with DTO macros because it's clean. But my object is a collection of known fields and unknown ones, like this:

    {
      "id": "theId",
      "unknown field 1": {
        <some object>
      },
      "unknown field 2": "<some string value>"
      ...
    }
    

    How would one do this with DTO macros? Do I have to declare the whole object as List or map (since it's toplevel/not a named field, I'm not even sure how to declare it) and get the known fields manually?

  • Adding Heartbeat Timer

    Adding Heartbeat Timer

    I'd like to add a custom timer that does something (asynchronously) every 5 seconds, such as logging a message or sending something over a custom socket connection.

    How would I add such a timer to the async server?

LAppS - Lua Application Server for micro-services with default communication over WebSockets. The fastest and most vertically scalable WebSockets server implementation ever. Low latency C++ <-> Lua stack roundtrip.

LAppS - Lua Application Server This is an attempt to provide very easy to use Lua Application Server working over WebSockets protocol (RFC 6455). LApp

Oct 13, 2022
A resource pack converter from Optifine/MCPatcher formats to other formats

MCPatcherPatcher++ A resource pack converter from Optifine format to newer and alternative formats. This project uses C++ as the language. This might

Dec 20, 2022
Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows
Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows

English | 简体中文 | 繁體中文 Overview Drogon is a C++14/17-based HTTP application framework. Drogon can be used to easily build various types of web applicat

Jan 5, 2023
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

Nov 13, 2022
Pipy is a tiny, high performance, highly stable, programmable proxy written in C++

Pipy is a tiny, high performance, highly stable, programmable proxy. Written in C++, built on top of Asio asynchronous I/O library, Pipy is extremely lightweight and fast, making it one of the best choices for service mesh sidecars.

Dec 23, 2022
DI: C++14 Dependency Injection Library
DI: C++14 Dependency Injection Library

[Boost::ext].DI Your C++14 one header only Dependency Injection library with no dependencies https://www.youtube.com/watch?v=yVogS4NbL6U Quick start D

Jan 1, 2023
Dependency manager library that supports decentralization

Arbiter Arbiter is a cross-platform C library1 which implements the baseline functionality that should be expected of any dependency manager or packag

Dec 11, 2021
Dec 15, 2022
The InitWare Suite of Middleware allows you to manage services and system resources as logical entities called units. Its main component is a service management ("init") system.
The InitWare Suite of Middleware allows you to manage services and system resources as logical entities called units. Its main component is a service management (

InitWare isn't ready to use yet!! Unless you are doing so for fun, to experiment, or to contribute, you most likely do not want to try to install Init

Dec 21, 2022
deserter is the first of its kind targeted DNS cache poisoner

deserter is the first of its kind targeted DNS cache poisoner. It is capable of DNS cache poisoning without bruteforcing the target ID and source port - instead, it sniffs out DNS probes and uses the information inside to craft poisoned responses and send them back to the target.

Dec 22, 2022
WAFer is a C language-based software platform for scalable server-side and networking applications. Think node.js for C programmers.

WAFer WAFer is a C language-based ultra-light scalable server-side web applications framework. Think node.js for C programmers. Because it's written i

Dec 6, 2022
A Fast and Easy to use microframework for the web.

A Fast and Easy to use microframework for the web. Description Crow is a C++ microframework for running web services. It uses routing similar to Pytho

Jan 4, 2023
Husarnet is a Peer-to-Peer VPN to connect your laptops, servers and microcontrollers over the Internet with zero configuration.

Husarnet Client Husarnet is a Peer-to-Peer VPN to connect your laptops, servers and microcontrollers over the Internet with zero configuration. Key fe

Jan 1, 2023
Parca-agent - eBPF based always-on profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!
Parca-agent - eBPF based always-on profiler auto-discovering targets in Kubernetes and systemd, zero code changes or restarts needed!

Parca Agent Parca Agent is an always-on sampling profiler that uses eBPF to capture raw profiling data with very low overhead. It observes user-space

Jan 1, 2023
High performance server-side application framework

Seastar Introduction SeaStar is an event-driven framework allowing you to write non-blocking, asynchronous code in a relatively straightforward manner

Jan 7, 2023
Light and fast program for remote control of a computer.
Light and fast program for remote control of a computer.

DeskX - Remote control program About The project was created for its own use within the home local network (you can use DeskX over the internet using

Nov 28, 2022
Light-weight UNIX backdoor

JadedWraith Lightweight UNIX backdoor for ethical hacking. Useful for red team engagements and CTFs. Something I wrote a few years ago as part of a ga

Aug 24, 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

Dec 29, 2022