Skip to content

Instantly share code, notes, and snippets.

Avatar

Benedikt-Alexander Mokroß bamkrs

View GitHub Profile
@bamkrs
bamkrs / AppComponent.hpp
Last active Sep 3, 2019
oatpp Websocket Event Distributor
View AppComponent.hpp
OATPP_CREATE_COMPONENT(std::shared_ptr<Events>, events)("eventDistributor" /* qualifier */, [] {
return Events::createShared();
}());
@bamkrs
bamkrs / ResponseHeadersReader.cpp
Created Aug 28, 2019
oatpp ResponseHeadersReader::readHeadersSection optimization
View ResponseHeadersReader.cpp
--- a/src/oatpp/web/protocol/http/incoming/ResponseHeadersReader.cpp
+++ b/src/oatpp/web/protocol/http/incoming/ResponseHeadersReader.cpp
@@ -32,8 +32,8 @@ data::v_io_size ResponseHeadersReader::readHeadersSection(const std::shared_ptr<
oatpp::data::stream::OutputStream* bufferStream,
Result& result) {
- v_word32 sectionEnd = ('\r' << 24) | ('\n' << 16) | ('\r' << 8) | ('\n');
- v_word32 accumulator = 0;
+ v_word32 sectionEnd = ('\r') | ('\n' << 8) | ('\r' << 16) | ('\n' << 24);
+ p_int32 rnrnptr = nullptr;
@bamkrs
bamkrs / Makefile
Last active Jan 22, 2020
oatpp OpenWRT Makefile
View Makefile
#
# Author: Benedikt-Alexander Mokroß <bam@icognize.de>
#
include $(TOPDIR)/rules.mk
PKG_NAME:=oatpp
PKG_VERSION:=0.19.12
PKG_RELEASE=6
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)