Initial commit

This commit is contained in:
rassomakhin 2025-09-30 16:27:18 +04:00
commit 170c59caae
34 changed files with 5974 additions and 0 deletions

8
.idea/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Editor-based HTTP Client requests
/httpRequests/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml

1
.idea/.name Normal file
View File

@ -0,0 +1 @@
SoftController

2
.idea/SC.iml Normal file
View File

@ -0,0 +1,2 @@
<?xml version="1.0" encoding="UTF-8"?>
<module classpath="CMake" type="CPP_MODULE" version="4" />

9
.idea/misc.xml Normal file
View File

@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="CMakePythonSetting">
<option name="pythonIntegrationState" value="YES" />
</component>
<component name="CMakeWorkspace" PROJECT_DIR="$PROJECT_DIR$/SoftController">
<contentRoot DIR="$PROJECT_DIR$" />
</component>
</project>

8
.idea/modules.xml Normal file
View File

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/SC.iml" filepath="$PROJECT_DIR$/.idea/SC.iml" />
</modules>
</component>
</project>

24
Dependencies Normal file
View File

@ -0,0 +1,24 @@
sudo apt install git gcc g++ cmake
jsoncpp >= 1.7
sudo apt install libjsoncpp-dev
libuuid
sudo apt install uuid-dev
zlib
sudo apt install zlib1g-dev
yaml-cpp
sudo apt install libyaml-cpp-dev
openSSL
sudo apt install openssl libssl-dev
hiredis
sudo apt-get install libhiredis-dev
postgresql
sudo apt-get install postgresql-all
ixwebsocket

50
Dockerfile Normal file
View File

@ -0,0 +1,50 @@
FROM ubuntu:jammy as sc-base
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
gcc \
g++ \
libssl-dev \
libjsoncpp-dev \
zlib1g-dev \
libmysqlclient-dev \
libpq-dev \
libsqlite3-dev
FROM sc-base as drogon-base
RUN apt-get install -y \
libjsoncpp-dev \
uuid-dev \
zlib1g-dev \
libyaml-cpp-dev \
openssl libssl-dev
FROM drogon-base as drogon-build
ADD https://github.com/drogonframework/drogon/archive/refs/tags/v1.9.11.tar.gz .
WORKDIR /usr/local/src/build
RUN tar --strip=1 -xf /drogon-1.9.11.tar.gz -C .. && \
cd drogon-1.9.11 && \
git submodule update --init && \
mkdir build && \
cd build && \
cmake -DCMAKE_BUILD_TYPE=Release .. && \
make && sudo make install
FROM sc-base as ixwebsocket-build
ADD https://github.com/machinezone/IXWebSocket/archive/refs/tags/v11.4.6.tar.gz .
WORKDIR /usr/local/src/build
RUN tar --strip=1 -xf /IXWebSocket-11.4.6.tar.gz -C .. && \
cd IXWebSocket-11.4.6.tag.gz && \
mkdir build && \
cd build && \
cmake -DUSE_TLS=1 .. && \
make -j && \
make install
WORKDIR /app
COPY . /app
RUN mkdir build && cd build && cmake .. && make
CMD ["./build/your_app_executable"]

561
SoftController/.gitignore vendored Normal file
View File

@ -0,0 +1,561 @@
# Created by https://www.toptal.com/developers/gitignore/api/intellij+all,visualstudio,visualstudiocode,cmake,c,c++
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij+all,visualstudio,visualstudiocode,cmake,c,c++
### C ###
# Prerequisites
*.d
# Object files
*.o
*.ko
*.obj
*.elf
# Linker output
*.ilk
*.map
*.exp
# Precompiled Headers
*.gch
*.pch
# Libraries
*.lib
*.a
*.la
*.lo
# Shared objects (inc. Windows DLLs)
*.dll
*.so
*.so.*
*.dylib
# Executables
*.exe
*.out
*.app
*.i*86
*.x86_64
*.hex
# Debug files
*.dSYM/
*.su
*.idb
*.pdb
# Kernel Module Compile Results
*.mod*
*.cmd
.tmp_versions/
modules.order
Module.symvers
Mkfile.old
dkms.conf
### C++ ###
# Prerequisites
# Compiled Object files
*.slo
# Precompiled Headers
# Linker files
# Debugger Files
# Compiled Dynamic libraries
# Fortran module files
*.mod
*.smod
# Compiled Static libraries
*.lai
# Executables
### CMake ###
CMakeLists.txt.user
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake
_deps
CMakeUserPresets.json
### CMake Patch ###
# External projects
*-prefix/
### Intellij+all ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
# User-specific stuff
.idea/**/workspace.xml
.idea/**/tasks.xml
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
# Generated files
.idea/**/contentModel.xml
# Sensitive or high-churn files
.idea/**/dataSources/
.idea/**/dataSources.ids
.idea/**/dataSources.local.xml
.idea/**/sqlDataSources.xml
.idea/**/dynamic.xml
.idea/**/uiDesigner.xml
.idea/**/dbnavigator.xml
# Gradle
.idea/**/gradle.xml
.idea/**/libraries
# Gradle and Maven with auto-import
# When using Gradle or Maven with auto-import, you should exclude module files,
# since they will be recreated, and may cause churn. Uncomment if using
# auto-import.
# .idea/artifacts
# .idea/compiler.xml
# .idea/jarRepositories.xml
# .idea/modules.xml
# .idea/*.iml
# .idea/modules
# *.iml
# *.ipr
# CMake
cmake-build-*/
# Mongo Explorer plugin
.idea/**/mongoSettings.xml
# File-based project format
*.iws
# IntelliJ
out/
# mpeltonen/sbt-idea plugin
.idea_modules/
# JIRA plugin
atlassian-ide-plugin.xml
# Cursive Clojure plugin
.idea/replstate.xml
# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties
# Editor-based Rest Client
.idea/httpRequests
# Android studio 3.1+ serialized cache file
.idea/caches/build_file_checksums.ser
### Intellij+all Patch ###
# Ignores the whole .idea folder and all .iml files
# See https://github.com/joeblau/gitignore.io/issues/186 and https://github.com/joeblau/gitignore.io/issues/360
.idea/
# Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-249601023
*.iml
modules.xml
.idea/misc.xml
*.ipr
# Sonarlint plugin
.idea/sonarlint
### VisualStudioCode ###
.vscode/*
!.vscode/tasks.json
!.vscode/launch.json
*.code-workspace
### VisualStudioCode Patch ###
# Ignore all local history of files
.history
.ionide
### VisualStudio ###
## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons.
##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
# User-specific files
*.rsuser
*.suo
*.user
*.userosscache
*.sln.docstates
# User-specific files (MonoDevelop/Xamarin Studio)
*.userprefs
# Mono auto generated files
mono_crash.*
# Build results
[Dd]ebug/
[Dd]ebugPublic/
[Rr]elease/
[Rr]eleases/
x64/
x86/
[Ww][Ii][Nn]32/
[Aa][Rr][Mm]/
[Aa][Rr][Mm]64/
bld/
[Bb]in/
[Oo]bj/
[Ll]og/
[Ll]ogs/
# Visual Studio 2015/2017 cache/options directory
.vs/
# Uncomment if you have tasks that create the project's static files in wwwroot
#wwwroot/
# Visual Studio 2017 auto generated files
Generated\ Files/
# MSTest test Results
[Tt]est[Rr]esult*/
[Bb]uild[Ll]og.*
# NUnit
*.VisualState.xml
TestResult.xml
nunit-*.xml
# Build Results of an ATL Project
[Dd]ebugPS/
[Rr]eleasePS/
dlldata.c
# Benchmark Results
BenchmarkDotNet.Artifacts/
# .NET Core
project.lock.json
project.fragment.lock.json
artifacts/
# ASP.NET Scaffolding
ScaffoldingReadMe.txt
# StyleCop
StyleCopReport.xml
# Files built by Visual Studio
*_i.c
*_p.c
*_h.h
*.meta
*.iobj
*.ipdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.tmp_proj
*_wpftmp.csproj
*.log
*.vspscc
*.vssscc
.builds
*.pidb
*.svclog
*.scc
# Chutzpah Test files
_Chutzpah*
# Visual C++ cache files
ipch/
*.aps
*.ncb
*.opendb
*.opensdf
*.sdf
*.cachefile
*.VC.db
*.VC.VC.opendb
# Visual Studio profiler
*.psess
*.vsp
*.vspx
*.sap
# Visual Studio Trace Files
*.e2e
# TFS 2012 Local Workspace
$tf/
# Guidance Automation Toolkit
*.gpState
# ReSharper is a .NET coding add-in
_ReSharper*/
*.[Rr]e[Ss]harper
*.DotSettings.user
# TeamCity is a build add-in
_TeamCity*
# DotCover is a Code Coverage Tool
*.dotCover
# AxoCover is a Code Coverage Tool
.axoCover/*
!.axoCover/settings.json
# Coverlet is a free, cross platform Code Coverage Tool
coverage*[.json, .xml, .info]
# Visual Studio code coverage results
*.coverage
*.coveragexml
# NCrunch
_NCrunch_*
.*crunch*.local.xml
nCrunchTemp_*
# MightyMoose
*.mm.*
AutoTest.Net/
# Web workbench (sass)
.sass-cache/
# Installshield output folder
[Ee]xpress/
# DocProject is a documentation generator add-in
DocProject/buildhelp/
DocProject/Help/*.HxT
DocProject/Help/*.HxC
DocProject/Help/*.hhc
DocProject/Help/*.hhk
DocProject/Help/*.hhp
DocProject/Help/Html2
DocProject/Help/html
# Click-Once directory
publish/
# Publish Web Output
*.[Pp]ublish.xml
*.azurePubxml
# Note: Comment the next line if you want to checkin your web deploy settings,
# but database connection strings (with potential passwords) will be unencrypted
*.pubxml
*.publishproj
# Microsoft Azure Web App publish settings. Comment the next line if you want to
# checkin your Azure Web App publish settings, but sensitive information contained
# in these scripts will be unencrypted
PublishScripts/
# NuGet Packages
*.nupkg
# NuGet Symbol Packages
*.snupkg
# The packages folder can be ignored because of Package Restore
**/[Pp]ackages/*
# except build/, which is used as an MSBuild target.
!**/[Pp]ackages/build/
# Uncomment if necessary however generally it will be regenerated when needed
#!**/[Pp]ackages/repositories.config
# NuGet v3's project.json files produces more ignorable files
*.nuget.props
*.nuget.targets
# Microsoft Azure Build Output
csx/
*.build.csdef
# Microsoft Azure Emulator
ecf/
rcf/
# Windows Store app package directories and files
AppPackages/
BundleArtifacts/
Package.StoreAssociation.xml
_pkginfo.txt
*.appx
*.appxbundle
*.appxupload
# Visual Studio cache files
# files ending in .cache can be ignored
*.[Cc]ache
# but keep track of directories ending in .cache
!?*.[Cc]ache/
# Others
ClientBin/
~$*
*~
*.dbmdl
*.dbproj.schemaview
*.jfm
*.pfx
*.publishsettings
orleans.codegen.cs
# Including strong name files can present a security risk
# (https://github.com/github/gitignore/pull/2483#issue-259490424)
#*.snk
# Since there are multiple workflows, uncomment next line to ignore bower_components
# (https://github.com/github/gitignore/pull/1529#issuecomment-104372622)
#bower_components/
# RIA/Silverlight projects
Generated_Code/
# Backup & report files from converting an old project file
# to a newer Visual Studio version. Backup files are not needed,
# because we have git ;-)
_UpgradeReport_Files/
Backup*/
UpgradeLog*.XML
UpgradeLog*.htm
ServiceFabricBackup/
*.rptproj.bak
# SQL Server files
*.mdf
*.ldf
*.ndf
# Business Intelligence projects
*.rdl.data
*.bim.layout
*.bim_*.settings
*.rptproj.rsuser
*- [Bb]ackup.rdl
*- [Bb]ackup ([0-9]).rdl
*- [Bb]ackup ([0-9][0-9]).rdl
# Microsoft Fakes
FakesAssemblies/
# GhostDoc plugin setting file
*.GhostDoc.xml
# Node.js Tools for Visual Studio
.ntvs_analysis.dat
node_modules/
# Visual Studio 6 build log
*.plg
# Visual Studio 6 workspace options file
*.opt
# Visual Studio 6 auto-generated workspace file (contains which files were open etc.)
*.vbw
# Visual Studio LightSwitch build output
**/*.HTMLClient/GeneratedArtifacts
**/*.DesktopClient/GeneratedArtifacts
**/*.DesktopClient/ModelManifest.xml
**/*.Server/GeneratedArtifacts
**/*.Server/ModelManifest.xml
_Pvt_Extensions
# Paket dependency manager
.paket/paket.exe
paket-files/
# FAKE - F# Make
.fake/
# CodeRush personal settings
.cr/personal
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
# Cake - Uncomment if you are using it
# tools/**
# !tools/packages.config
# Tabs Studio
*.tss
# Telerik's JustMock configuration file
*.jmconfig
# BizTalk build output
*.btp.cs
*.btm.cs
*.odx.cs
*.xsd.cs
# OpenCover UI analysis results
OpenCover/
# Azure Stream Analytics local run output
ASALocalRun/
# MSBuild Binary and Structured Log
*.binlog
# NVidia Nsight GPU debugger configuration file
*.nvuser
# MFractors (Xamarin productivity tool) working folder
.mfractor/
# Local History for Visual Studio
.localhistory/
# BeatPulse healthcheck temp database
healthchecksdb
# Backup folder for Package Reference Convert tool in Visual Studio 2017
MigrationBackup/
# Ionide (cross platform F# VS Code tools) working folder
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
### VisualStudio Patch ###
# Additional files built by Visual Studio
*.tlog
# End of https://www.toptal.com/developers/gitignore/api/intellij+all,visualstudio,visualstudiocode,cmake,c,c++

View File

@ -0,0 +1,63 @@
cmake_minimum_required(VERSION 3.5)
project(SoftController CXX)
include(CheckIncludeFileCXX)
check_include_file_cxx(any HAS_ANY)
check_include_file_cxx(string_view HAS_STRING_VIEW)
check_include_file_cxx(coroutine HAS_COROUTINE)
if (NOT "${CMAKE_CXX_STANDARD}" STREQUAL "")
elseif (HAS_ANY AND HAS_STRING_VIEW AND HAS_COROUTINE)
set(CMAKE_CXX_STANDARD 20)
elseif (HAS_ANY AND HAS_STRING_VIEW)
set(CMAKE_CXX_STANDARD 17)
else ()
set(CMAKE_CXX_STANDARD 14)
endif ()
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
add_executable(SoftController main.cpp
wsHandler/wsSessionHandler.cpp
wsHandler/wsSessionHandler.h)
find_package(Drogon CONFIG REQUIRED)
target_link_libraries(SoftController PRIVATE Drogon::Drogon)
find_package(ixwebsocket CONFIG REQUIRED)
target_link_libraries(SoftController PRIVATE ixwebsocket::ixwebsocket)
# ##############################################################################
if (CMAKE_CXX_STANDARD LESS 17)
message(FATAL_ERROR "c++17 or higher is required")
elseif (CMAKE_CXX_STANDARD LESS 20)
message(STATUS "use c++17")
else ()
message(STATUS "use c++20")
endif ()
aux_source_directory(controllers CTL_SRC)
aux_source_directory(filters FILTER_SRC)
aux_source_directory(plugins PLUGIN_SRC)
aux_source_directory(models MODEL_SRC)
drogon_create_views(SoftController ${CMAKE_CURRENT_SOURCE_DIR}/views
${CMAKE_CURRENT_BINARY_DIR})
target_include_directories(SoftController
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/models)
target_sources(SoftController
PRIVATE
${SRC_DIR}
${CTL_SRC}
${FILTER_SRC}
${PLUGIN_SRC}
${MODEL_SRC})
# ##############################################################################
# uncomment the following line for dynamically loading views
# set_property(TARGET ${PROJECT_NAME} PROPERTY ENABLE_EXPORTS ON)
# ##############################################################################
add_subdirectory(test)

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,450 @@
{
"inputs" :
[
{
"path" : "CMakeLists.txt"
},
{
"isGenerated" : true,
"path" : "build/CMakeFiles/3.31.6/CMakeSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeSystemSpecificInitialize.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Platform/Linux-Initialize.cmake"
},
{
"isGenerated" : true,
"path" : "build/CMakeFiles/3.31.6/CMakeCXXCompiler.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeSystemSpecificInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeGenericSystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeInitializeConfigs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Platform/Linux.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Platform/UnixPaths.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeCXXInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeLanguageInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Compiler/GNU-CXX.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Compiler/GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Compiler/CMakeCommonCompilerMacros.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Platform/Linux-GNU-CXX.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Platform/Linux-GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeCommonLanguageInclude.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Internal/CMakeCXXLinkerInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Internal/CMakeCommonLinkerInformation.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Linker/GNU-CXX.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Linker/GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Platform/Linker/Linux-GNU-CXX.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Platform/Linker/Linux-GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Platform/Linker/GNU.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CheckIncludeFileCXX.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/DrogonConfigVersion.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/DrogonConfig.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/FindJsoncpp.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Trantor/TrantorConfigVersion.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Trantor/TrantorConfig.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindOpenSSL.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPkgConfig.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindThreads.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CheckLibraryExists.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CheckIncludeFileCXX.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CheckCXXSourceCompiles.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Internal/CheckSourceCompiles.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Trantor/TrantorTargets.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Trantor/TrantorTargets-noconfig.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/FindUUID.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindZLIB.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/SelectLibraryConfigurations.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/Findpg.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPostgreSQL.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/SelectLibraryConfigurations.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/FindSQLite3.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/FindBrotli.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/FindHiredis.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isExternal" : true,
"path" : "/usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/yaml-cpp-config-version.cmake"
},
{
"isExternal" : true,
"path" : "/usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/yaml-cpp-config.cmake"
},
{
"isExternal" : true,
"path" : "/usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/yaml-cpp-targets.cmake"
},
{
"isExternal" : true,
"path" : "/usr/lib/x86_64-linux-gnu/cmake/yaml-cpp/yaml-cpp-targets-none.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/FindFilesystem.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakePushCheckState.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CheckIncludeFileCXX.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CheckCXXSourceRuns.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/Internal/CheckSourceRuns.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/FindFilesystem.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/DrogonTargets.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/DrogonTargets-noconfig.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/DrogonUtilities.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/Drogon/ParseAndAddDrogonTests.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/ixwebsocket/ixwebsocket-config.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindZLIB.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageHandleStandardArgs.cmake"
},
{
"isCMake" : true,
"isExternal" : true,
"path" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/FindPackageMessage.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/ixwebsocket/ixwebsocket-targets.cmake"
},
{
"isExternal" : true,
"path" : "/usr/local/lib/cmake/ixwebsocket/ixwebsocket-targets-noconfig.cmake"
},
{
"path" : "test/CMakeLists.txt"
}
],
"kind" : "cmakeFiles",
"paths" :
{
"build" : "/home/user/\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b/SC/SoftController/build",
"source" : "/home/user/\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b/SC/SoftController"
},
"version" :
{
"major" : 1,
"minor" : 1
}
}

View File

@ -0,0 +1,102 @@
{
"configurations" :
[
{
"directories" :
[
{
"build" : ".",
"childIndexes" :
[
1
],
"jsonFile" : "directory-.-Debug-f5ebdc15457944623624.json",
"minimumCMakeVersion" :
{
"string" : "3.5"
},
"projectIndex" : 0,
"source" : ".",
"targetIndexes" :
[
0
]
},
{
"build" : "test",
"jsonFile" : "directory-test-Debug-451c0598f41488bb20b9.json",
"minimumCMakeVersion" :
{
"string" : "3.5"
},
"parentIndex" : 0,
"projectIndex" : 1,
"source" : "test",
"targetIndexes" :
[
1
]
}
],
"name" : "Debug",
"projects" :
[
{
"childIndexes" :
[
1
],
"directoryIndexes" :
[
0
],
"name" : "SoftController",
"targetIndexes" :
[
0
]
},
{
"directoryIndexes" :
[
1
],
"name" : "SoftController_test",
"parentIndex" : 0,
"targetIndexes" :
[
1
]
}
],
"targets" :
[
{
"directoryIndex" : 0,
"id" : "SoftController::@6890427a1f51a3e7e1df",
"jsonFile" : "target-SoftController-Debug-c93ed6fd48ac61a06cf3.json",
"name" : "SoftController",
"projectIndex" : 0
},
{
"directoryIndex" : 1,
"id" : "SoftController_test::@36f028580bb02cc8272a",
"jsonFile" : "target-SoftController_test-Debug-c13917e8267ae522df69.json",
"name" : "SoftController_test",
"projectIndex" : 1
}
]
}
],
"kind" : "codemodel",
"paths" :
{
"build" : "/home/user/\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b/SC/SoftController/build",
"source" : "/home/user/\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b/SC/SoftController"
},
"version" :
{
"major" : 2,
"minor" : 7
}
}

View File

@ -0,0 +1,14 @@
{
"backtraceGraph" :
{
"commands" : [],
"files" : [],
"nodes" : []
},
"installers" : [],
"paths" :
{
"build" : ".",
"source" : "."
}
}

View File

@ -0,0 +1,14 @@
{
"backtraceGraph" :
{
"commands" : [],
"files" : [],
"nodes" : []
},
"installers" : [],
"paths" :
{
"build" : "test",
"source" : "test"
}
}

View File

@ -0,0 +1,108 @@
{
"cmake" :
{
"generator" :
{
"multiConfig" : false,
"name" : "Ninja"
},
"paths" :
{
"cmake" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/bin/cmake",
"cpack" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/bin/cpack",
"ctest" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/bin/ctest",
"root" : "/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31"
},
"version" :
{
"isDirty" : false,
"major" : 3,
"minor" : 31,
"patch" : 6,
"string" : "3.31.6",
"suffix" : ""
}
},
"objects" :
[
{
"jsonFile" : "codemodel-v2-1210f20026b3713e2321.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 7
}
},
{
"jsonFile" : "cache-v2-3ddaebc9e370345634d3.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
{
"jsonFile" : "cmakeFiles-v1-adb70d0cbbec256052fa.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 1
}
},
{
"jsonFile" : "toolchains-v1-c53f300132ef10ed09e2.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
],
"reply" :
{
"cache-v2" :
{
"jsonFile" : "cache-v2-3ddaebc9e370345634d3.json",
"kind" : "cache",
"version" :
{
"major" : 2,
"minor" : 0
}
},
"cmakeFiles-v1" :
{
"jsonFile" : "cmakeFiles-v1-adb70d0cbbec256052fa.json",
"kind" : "cmakeFiles",
"version" :
{
"major" : 1,
"minor" : 1
}
},
"codemodel-v2" :
{
"jsonFile" : "codemodel-v2-1210f20026b3713e2321.json",
"kind" : "codemodel",
"version" :
{
"major" : 2,
"minor" : 7
}
},
"toolchains-v1" :
{
"jsonFile" : "toolchains-v1-c53f300132ef10ed09e2.json",
"kind" : "toolchains",
"version" :
{
"major" : 1,
"minor" : 0
}
}
}
}

View File

@ -0,0 +1,511 @@
{
"artifacts" :
[
{
"path" : "SoftController"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable",
"target_link_libraries",
"set_target_properties",
"include",
"find_package",
"find_dependency",
"target_include_directories"
],
"files" :
[
"CMakeLists.txt",
"/usr/local/lib/cmake/Drogon/DrogonTargets.cmake",
"/usr/local/lib/cmake/Drogon/DrogonConfig.cmake",
"/usr/local/lib/cmake/Trantor/TrantorTargets.cmake",
"/usr/local/lib/cmake/Trantor/TrantorConfig.cmake",
"/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake",
"/usr/local/lib/cmake/Drogon/FindJsoncpp.cmake",
"/usr/local/lib/cmake/Drogon/FindUUID.cmake",
"/usr/local/lib/cmake/Drogon/FindBrotli.cmake",
"/usr/local/lib/cmake/Drogon/Findpg.cmake",
"/usr/local/lib/cmake/Drogon/FindSQLite3.cmake",
"/usr/local/lib/cmake/Drogon/FindHiredis.cmake",
"/usr/local/lib/cmake/ixwebsocket/ixwebsocket-targets.cmake",
"/usr/local/lib/cmake/ixwebsocket/ixwebsocket-config.cmake"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 21,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 26,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 29,
"parent" : 0
},
{
"command" : 4,
"file" : 0,
"line" : 25,
"parent" : 0
},
{
"file" : 2,
"parent" : 4
},
{
"command" : 3,
"file" : 2,
"line" : 79,
"parent" : 5
},
{
"file" : 1,
"parent" : 6
},
{
"command" : 2,
"file" : 1,
"line" : 61,
"parent" : 7
},
{
"command" : 5,
"file" : 2,
"line" : 40,
"parent" : 5
},
{
"command" : 4,
"file" : 5,
"line" : 76,
"parent" : 9
},
{
"file" : 4,
"parent" : 10
},
{
"command" : 3,
"file" : 4,
"line" : 57,
"parent" : 11
},
{
"file" : 3,
"parent" : 12
},
{
"command" : 2,
"file" : 3,
"line" : 61,
"parent" : 13
},
{
"command" : 5,
"file" : 2,
"line" : 39,
"parent" : 5
},
{
"command" : 4,
"file" : 5,
"line" : 76,
"parent" : 15
},
{
"file" : 6,
"parent" : 16
},
{
"command" : 2,
"file" : 6,
"line" : 67,
"parent" : 17
},
{
"command" : 5,
"file" : 2,
"line" : 42,
"parent" : 5
},
{
"command" : 4,
"file" : 5,
"line" : 76,
"parent" : 19
},
{
"file" : 7,
"parent" : 20
},
{
"command" : 2,
"file" : 7,
"line" : 110,
"parent" : 21
},
{
"command" : 5,
"file" : 2,
"line" : 55,
"parent" : 5
},
{
"command" : 4,
"file" : 5,
"line" : 76,
"parent" : 23
},
{
"file" : 8,
"parent" : 24
},
{
"command" : 2,
"file" : 8,
"line" : 45,
"parent" : 25
},
{
"command" : 5,
"file" : 2,
"line" : 46,
"parent" : 5
},
{
"command" : 4,
"file" : 5,
"line" : 76,
"parent" : 27
},
{
"file" : 9,
"parent" : 28
},
{
"command" : 2,
"file" : 9,
"line" : 16,
"parent" : 29
},
{
"command" : 5,
"file" : 2,
"line" : 49,
"parent" : 5
},
{
"command" : 4,
"file" : 5,
"line" : 76,
"parent" : 31
},
{
"file" : 10,
"parent" : 32
},
{
"command" : 2,
"file" : 10,
"line" : 33,
"parent" : 33
},
{
"command" : 5,
"file" : 2,
"line" : 61,
"parent" : 5
},
{
"command" : 4,
"file" : 5,
"line" : 76,
"parent" : 35
},
{
"file" : 11,
"parent" : 36
},
{
"command" : 2,
"file" : 11,
"line" : 36,
"parent" : 37
},
{
"command" : 4,
"file" : 0,
"line" : 28,
"parent" : 0
},
{
"file" : 13,
"parent" : 39
},
{
"command" : 3,
"file" : 13,
"line" : 9,
"parent" : 40
},
{
"file" : 12,
"parent" : 41
},
{
"command" : 2,
"file" : 12,
"line" : 61,
"parent" : 42
},
{
"command" : 6,
"file" : 0,
"line" : 48,
"parent" : 0
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : "-g -std=c++17 -fdiagnostics-color=always"
}
],
"defines" :
[
{
"backtrace" : 2,
"define" : "HAS_YAML_CPP"
},
{
"backtrace" : 3,
"define" : "IXWEBSOCKET_USE_OPEN_SSL"
},
{
"backtrace" : 3,
"define" : "IXWEBSOCKET_USE_TLS"
},
{
"backtrace" : 3,
"define" : "IXWEBSOCKET_USE_ZLIB"
}
],
"includes" :
[
{
"backtrace" : 44,
"path" : "/home/user/\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b/SC/SoftController"
},
{
"backtrace" : 44,
"path" : "/home/user/\u0420\u0430\u0431\u043e\u0447\u0438\u0439 \u0441\u0442\u043e\u043b/SC/SoftController/models"
},
{
"backtrace" : 2,
"isSystem" : true,
"path" : "/usr/include/jsoncpp"
},
{
"backtrace" : 3,
"isSystem" : true,
"path" : "/usr/local/include/ixwebsocket"
}
],
"language" : "CXX",
"languageStandard" :
{
"backtraces" :
[
1
],
"standard" : "17"
},
"sourceIndexes" :
[
0,
1
]
}
],
"id" : "SoftController::@6890427a1f51a3e7e1df",
"link" :
{
"commandFragments" :
[
{
"fragment" : "-g",
"role" : "flags"
},
{
"fragment" : "",
"role" : "flags"
},
{
"fragment" : "-Wl,-rpath,/usr/local/lib",
"role" : "libraries"
},
{
"backtrace" : 2,
"fragment" : "/usr/local/lib/libdrogon.a",
"role" : "libraries"
},
{
"backtrace" : 3,
"fragment" : "/usr/local/lib/libixwebsocket.a",
"role" : "libraries"
},
{
"backtrace" : 8,
"fragment" : "/usr/local/lib/libtrantor.a",
"role" : "libraries"
},
{
"backtrace" : 14,
"fragment" : "/usr/lib/x86_64-linux-gnu/libssl.so",
"role" : "libraries"
},
{
"backtrace" : 14,
"fragment" : "/usr/lib/x86_64-linux-gnu/libcrypto.so",
"role" : "libraries"
},
{
"backtrace" : 14,
"fragment" : "-lpthread",
"role" : "libraries"
},
{
"backtrace" : 8,
"fragment" : "-ldl",
"role" : "libraries"
},
{
"backtrace" : 18,
"fragment" : "/usr/lib/x86_64-linux-gnu/libjsoncpp.so",
"role" : "libraries"
},
{
"backtrace" : 8,
"fragment" : "-lyaml-cpp",
"role" : "libraries"
},
{
"backtrace" : 22,
"fragment" : "/usr/lib/x86_64-linux-gnu/libuuid.so",
"role" : "libraries"
},
{
"backtrace" : 26,
"fragment" : "/usr/lib/x86_64-linux-gnu/libbrotlidec.so",
"role" : "libraries"
},
{
"backtrace" : 26,
"fragment" : "/usr/lib/x86_64-linux-gnu/libbrotlienc.so",
"role" : "libraries"
},
{
"backtrace" : 26,
"fragment" : "/usr/lib/x86_64-linux-gnu/libbrotlicommon.so",
"role" : "libraries"
},
{
"backtrace" : 30,
"fragment" : "/usr/lib/x86_64-linux-gnu/libpq.so",
"role" : "libraries"
},
{
"backtrace" : 34,
"fragment" : "/usr/lib/x86_64-linux-gnu/libsqlite3.so",
"role" : "libraries"
},
{
"backtrace" : 38,
"fragment" : "/usr/local/lib/libhiredis.so",
"role" : "libraries"
},
{
"backtrace" : 8,
"fragment" : "/usr/local/lib/libz.so",
"role" : "libraries"
},
{
"backtrace" : 43,
"fragment" : "/usr/lib/x86_64-linux-gnu/libssl.so",
"role" : "libraries"
},
{
"backtrace" : 43,
"fragment" : "/usr/lib/x86_64-linux-gnu/libcrypto.so",
"role" : "libraries"
}
],
"language" : "CXX"
},
"name" : "SoftController",
"nameOnDisk" : "SoftController",
"paths" :
{
"build" : ".",
"source" : "."
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0,
1
]
},
{
"name" : "Header Files",
"sourceIndexes" :
[
2
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "main.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "wsHandler/wsSessionHandler.cpp",
"sourceGroupIndex" : 0
},
{
"backtrace" : 1,
"path" : "wsHandler/wsSessionHandler.h",
"sourceGroupIndex" : 1
}
],
"type" : "EXECUTABLE"
}

View File

@ -0,0 +1,414 @@
{
"artifacts" :
[
{
"path" : "test/SoftController_test"
}
],
"backtrace" : 1,
"backtraceGraph" :
{
"commands" :
[
"add_executable",
"target_link_libraries",
"set_target_properties",
"include",
"find_package",
"find_dependency"
],
"files" :
[
"test/CMakeLists.txt",
"/usr/local/lib/cmake/Drogon/DrogonTargets.cmake",
"/usr/local/lib/cmake/Drogon/DrogonConfig.cmake",
"CMakeLists.txt",
"/usr/local/lib/cmake/Trantor/TrantorTargets.cmake",
"/usr/local/lib/cmake/Trantor/TrantorConfig.cmake",
"/home/user/\u0414\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u044b/Utils/clion-2025.1.4/bin/cmake/linux/x64/share/cmake-3.31/Modules/CMakeFindDependencyMacro.cmake",
"/usr/local/lib/cmake/Drogon/FindJsoncpp.cmake",
"/usr/local/lib/cmake/Drogon/FindUUID.cmake",
"/usr/local/lib/cmake/Drogon/FindBrotli.cmake",
"/usr/local/lib/cmake/Drogon/Findpg.cmake",
"/usr/local/lib/cmake/Drogon/FindSQLite3.cmake",
"/usr/local/lib/cmake/Drogon/FindHiredis.cmake"
],
"nodes" :
[
{
"file" : 0
},
{
"command" : 0,
"file" : 0,
"line" : 4,
"parent" : 0
},
{
"command" : 1,
"file" : 0,
"line" : 12,
"parent" : 0
},
{
"file" : 3
},
{
"command" : 4,
"file" : 3,
"line" : 25,
"parent" : 3
},
{
"file" : 2,
"parent" : 4
},
{
"command" : 3,
"file" : 2,
"line" : 79,
"parent" : 5
},
{
"file" : 1,
"parent" : 6
},
{
"command" : 2,
"file" : 1,
"line" : 61,
"parent" : 7
},
{
"command" : 5,
"file" : 2,
"line" : 40,
"parent" : 5
},
{
"command" : 4,
"file" : 6,
"line" : 76,
"parent" : 9
},
{
"file" : 5,
"parent" : 10
},
{
"command" : 3,
"file" : 5,
"line" : 57,
"parent" : 11
},
{
"file" : 4,
"parent" : 12
},
{
"command" : 2,
"file" : 4,
"line" : 61,
"parent" : 13
},
{
"command" : 5,
"file" : 2,
"line" : 39,
"parent" : 5
},
{
"command" : 4,
"file" : 6,
"line" : 76,
"parent" : 15
},
{
"file" : 7,
"parent" : 16
},
{
"command" : 2,
"file" : 7,
"line" : 67,
"parent" : 17
},
{
"command" : 5,
"file" : 2,
"line" : 42,
"parent" : 5
},
{
"command" : 4,
"file" : 6,
"line" : 76,
"parent" : 19
},
{
"file" : 8,
"parent" : 20
},
{
"command" : 2,
"file" : 8,
"line" : 110,
"parent" : 21
},
{
"command" : 5,
"file" : 2,
"line" : 55,
"parent" : 5
},
{
"command" : 4,
"file" : 6,
"line" : 76,
"parent" : 23
},
{
"file" : 9,
"parent" : 24
},
{
"command" : 2,
"file" : 9,
"line" : 45,
"parent" : 25
},
{
"command" : 5,
"file" : 2,
"line" : 46,
"parent" : 5
},
{
"command" : 4,
"file" : 6,
"line" : 76,
"parent" : 27
},
{
"file" : 10,
"parent" : 28
},
{
"command" : 2,
"file" : 10,
"line" : 16,
"parent" : 29
},
{
"command" : 5,
"file" : 2,
"line" : 49,
"parent" : 5
},
{
"command" : 4,
"file" : 6,
"line" : 76,
"parent" : 31
},
{
"file" : 11,
"parent" : 32
},
{
"command" : 2,
"file" : 11,
"line" : 33,
"parent" : 33
},
{
"command" : 5,
"file" : 2,
"line" : 61,
"parent" : 5
},
{
"command" : 4,
"file" : 6,
"line" : 76,
"parent" : 35
},
{
"file" : 12,
"parent" : 36
},
{
"command" : 2,
"file" : 12,
"line" : 36,
"parent" : 37
}
]
},
"compileGroups" :
[
{
"compileCommandFragments" :
[
{
"fragment" : "-g -std=c++17 -fdiagnostics-color=always"
}
],
"defines" :
[
{
"backtrace" : 2,
"define" : "HAS_YAML_CPP"
}
],
"includes" :
[
{
"backtrace" : 2,
"isSystem" : true,
"path" : "/usr/include/jsoncpp"
}
],
"language" : "CXX",
"languageStandard" :
{
"backtraces" :
[
1
],
"standard" : "17"
},
"sourceIndexes" :
[
0
]
}
],
"id" : "SoftController_test::@36f028580bb02cc8272a",
"link" :
{
"commandFragments" :
[
{
"fragment" : "-g",
"role" : "flags"
},
{
"fragment" : "",
"role" : "flags"
},
{
"fragment" : "-Wl,-rpath,/usr/local/lib",
"role" : "libraries"
},
{
"backtrace" : 2,
"fragment" : "/usr/local/lib/libdrogon.a",
"role" : "libraries"
},
{
"backtrace" : 8,
"fragment" : "/usr/local/lib/libtrantor.a",
"role" : "libraries"
},
{
"backtrace" : 14,
"fragment" : "/usr/lib/x86_64-linux-gnu/libssl.so",
"role" : "libraries"
},
{
"backtrace" : 14,
"fragment" : "/usr/lib/x86_64-linux-gnu/libcrypto.so",
"role" : "libraries"
},
{
"backtrace" : 14,
"fragment" : "-lpthread",
"role" : "libraries"
},
{
"backtrace" : 8,
"fragment" : "-ldl",
"role" : "libraries"
},
{
"backtrace" : 18,
"fragment" : "/usr/lib/x86_64-linux-gnu/libjsoncpp.so",
"role" : "libraries"
},
{
"backtrace" : 8,
"fragment" : "-lyaml-cpp",
"role" : "libraries"
},
{
"backtrace" : 22,
"fragment" : "/usr/lib/x86_64-linux-gnu/libuuid.so",
"role" : "libraries"
},
{
"backtrace" : 26,
"fragment" : "/usr/lib/x86_64-linux-gnu/libbrotlidec.so",
"role" : "libraries"
},
{
"backtrace" : 26,
"fragment" : "/usr/lib/x86_64-linux-gnu/libbrotlienc.so",
"role" : "libraries"
},
{
"backtrace" : 26,
"fragment" : "/usr/lib/x86_64-linux-gnu/libbrotlicommon.so",
"role" : "libraries"
},
{
"backtrace" : 30,
"fragment" : "/usr/lib/x86_64-linux-gnu/libpq.so",
"role" : "libraries"
},
{
"backtrace" : 34,
"fragment" : "/usr/lib/x86_64-linux-gnu/libsqlite3.so",
"role" : "libraries"
},
{
"backtrace" : 38,
"fragment" : "/usr/local/lib/libhiredis.so",
"role" : "libraries"
},
{
"backtrace" : 8,
"fragment" : "/usr/local/lib/libz.so",
"role" : "libraries"
}
],
"language" : "CXX"
},
"name" : "SoftController_test",
"nameOnDisk" : "SoftController_test",
"paths" :
{
"build" : "test",
"source" : "test"
},
"sourceGroups" :
[
{
"name" : "Source Files",
"sourceIndexes" :
[
0
]
}
],
"sources" :
[
{
"backtrace" : 1,
"compileGroupIndex" : 0,
"path" : "test/test_main.cc",
"sourceGroupIndex" : 0
}
],
"type" : "EXECUTABLE"
}

View File

@ -0,0 +1,70 @@
{
"kind" : "toolchains",
"toolchains" :
[
{
"compiler" :
{
"id" : "GNU",
"implicit" :
{
"includeDirectories" :
[
"/usr/include/c++/13",
"/usr/include/x86_64-linux-gnu/c++/13",
"/usr/include/c++/13/backward",
"/usr/lib/gcc/x86_64-linux-gnu/13/include",
"/usr/local/include",
"/usr/include/x86_64-linux-gnu",
"/usr/include"
],
"linkDirectories" :
[
"/usr/lib/gcc/x86_64-linux-gnu/13",
"/usr/lib/x86_64-linux-gnu",
"/usr/lib",
"/lib/x86_64-linux-gnu",
"/lib"
],
"linkFrameworkDirectories" : [],
"linkLibraries" :
[
"stdc++",
"m",
"gcc_s",
"gcc",
"c",
"gcc_s",
"gcc"
]
},
"path" : "/usr/bin/c++",
"version" : "13.3.0"
},
"language" : "CXX",
"sourceFileExtensions" :
[
"C",
"M",
"c++",
"cc",
"cpp",
"cxx",
"m",
"mm",
"mpp",
"CPP",
"ixx",
"cppm",
"ccm",
"cxxm",
"c++m"
]
}
],
"version" :
{
"major" : 1,
"minor" : 0
}
}

Binary file not shown.

View File

@ -0,0 +1,45 @@
# ninja log v6
4213 5132 1759226397914410500 SoftController affda4e9945cadbd
3 4213 1759226393704418173 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
1 99 1759228574288447609 build.ninja 4dfc72edd662679e
2 248 1759228574299447589 CMakeFiles/SoftController.dir/wsHandler/wsSessionHandler.cpp.o 3cdbae51b5aeaa59
2 4396 1759228574299447589 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4396 5304 1759228578693439588 SoftController edcd736a81ccf156
2 256 1759231650587255717 CMakeFiles/SoftController.dir/wsHandler/wsSessionHandler.cpp.o 3cdbae51b5aeaa59
2 4580 1759231650587255717 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4580 5555 1759231655165220847 SoftController edcd736a81ccf156
3 327 1759232483879749841 CMakeFiles/SoftController.dir/wsHandler/wsSessionHandler.cpp.o 3cdbae51b5aeaa59
2 5208 1759232483879749841 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
5208 6175 1759232489084710975 SoftController edcd736a81ccf156
3 5283 1759232817357296938 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
5283 6472 1759232822638258582 SoftController edcd736a81ccf156
3 4192 1759232976309147353 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4192 5114 1759232980498117179 SoftController edcd736a81ccf156
6 4832 1759233332290599207 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4832 6042 1759233337116564839 SoftController edcd736a81ccf156
2 4205 1759233756176591485 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4205 5195 1759233760378561754 SoftController edcd736a81ccf156
3 4799 1759233811443200534 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4799 5824 1759233816239166617 SoftController edcd736a81ccf156
2 4796 1759233844692965435 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4796 5887 1759233849486931542 SoftController edcd736a81ccf156
2 4781 1759233923486629674 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4781 6264 1759233928265623024 SoftController edcd736a81ccf156
2 5347 1759234052522378176 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
5347 6480 1759234057867364796 SoftController edcd736a81ccf156
3 4535 1759234117623201077 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4535 5533 1759234122155187651 SoftController edcd736a81ccf156
2 4427 1759234200177936139 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4427 5355 1759234204602920784 SoftController edcd736a81ccf156
3 4429 1759234279209646008 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4429 5351 1759234283634628818 SoftController edcd736a81ccf156
7 4852 1759234387225201013 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4852 5808 1759234392070179897 SoftController edcd736a81ccf156
4 4341 1759234426643026596 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4341 5331 1759234430980007052 SoftController edcd736a81ccf156
2 4248 1759234433697994769 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4248 5292 1759234437943975527 SoftController edcd736a81ccf156
2 4867 1759234469361831180 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4867 6185 1759234474226808527 SoftController edcd736a81ccf156
3 4741 1759234510933635105 CMakeFiles/SoftController.dir/main.cpp.o 38fabe9f46373cc7
4741 5771 1759234515671612410 SoftController edcd736a81ccf156

Binary file not shown.

File diff suppressed because one or more lines are too long

350
SoftController/config.json Normal file
View File

@ -0,0 +1,350 @@
/* This is a JSON format configuration file
*/
{
/*
//ssl:The global SSL settings. "key" and "cert" are the path to the SSL key and certificate. While
// "conf" is an array of 1 or 2-element tuples that supplies file style options for `SSL_CONF_cmd`.
"ssl": {
"cert": "../../trantor/trantor/tests/server.crt",
"key": "../../trantor/trantor/tests/server.key",
"conf": [
//["Options", "-SessionTicket"],
//["Options", "Compression"]
]
},
"listeners": [
{
//address: Ip address,0.0.0.0 by default
"address": "0.0.0.0",
//port: Port number
"port": 80,
//https: If true, use https for security,false by default
"https": false
},
{
"address": "0.0.0.0",
"port": 443,
"https": true,
//cert,key: Cert file path and key file path, empty by default,
//if empty, use the global setting
"cert": "",
"key": "",
//use_old_tls: enable the TLS1.0/1.1, false by default
"use_old_tls": false,
"ssl_conf": [
//["MinProtocol", "TLSv1.3"]
]
}
],
"db_clients": [
{
//name: Name of the client,'default' by default
"name": "default",
//rdbms: Server type, postgresql,mysql or sqlite3, "postgresql" by default
"rdbms": "postgresql",
//filename: Sqlite3 db file name
//"filename":"",
//host: Server address,localhost by default
"host": "127.0.0.1",
//port: Server port, 5432 by default
"port": 5432,
//dbname: Database name
"dbname": "test",
//user: 'postgres' by default
"user": "",
//passwd: '' by default
"passwd": "",
//is_fast: false by default, if it is true, the client is faster but user can't call
//any synchronous interface of it.
"is_fast": false,
//client_encoding: The character set used by the client. it is empty string by default which
//means use the default character set.
//"client_encoding": "",
//number_of_connections: 1 by default, if the 'is_fast' is true, the number is the number of
//connections per IO thread, otherwise it is the total number of all connections.
"number_of_connections": 1,
//timeout: -1.0 by default, in seconds, the timeout for executing a SQL query.
//zero or negative value means no timeout.
"timeout": -1.0,
//auto_batch: this feature is only available for the PostgreSQL driver(version >= 14.0), see
//the wiki for more details.
"auto_batch": false
//connect_options: extra options for the connection. Only works for PostgreSQL now.
//For more information, see https://www.postgresql.org/docs/16/libpq-connect.html#LIBPQ-CONNECT-OPTIONS
//"connect_options": { "statement_timeout": "1s" }
}
],
"redis_clients": [
{
//name: Name of the client,'default' by default
"name": "default",
//host: Server IP, 127.0.0.1 by default
"host": "127.0.0.1",
//port: Server port, 6379 by default
"port": 6379,
//username: '' by default which means 'default' in redis ACL
"username": "",
//passwd: '' by default
"passwd": "",
//db index: 0 by default
"db": 0,
//is_fast: false by default, if it is true, the client is faster but user can't call
//any synchronous interface of it.
"is_fast": false,
//number_of_connections: 1 by default, if the 'is_fast' is true, the number is the number of
//connections per IO thread, otherwise it is the total number of all connections.
"number_of_connections": 1,
//timeout: -1.0 by default, in seconds, the timeout for executing a command.
//zero or negative value means no timeout.
"timeout": -1.0
}
],*/
"app": {
//number_of_threads: The number of IO threads, 1 by default, if the value is set to 0, the number of threads
//is the number of CPU cores
"number_of_threads": 1,
//enable_session: False by default
"enable_session": false,
"session_timeout": 0,
//string value of SameSite attribute of the Set-Cookie HTTP response header
//valid value is either 'Null' (default), 'Lax', 'Strict' or 'None'
"session_same_site" : "Null",
//session_cookie_key: The cookie key of the session, "JSESSIONID" by default
"session_cookie_key": "JSESSIONID",
//session_max_age: The max age of the session cookie, -1 by default
"session_max_age": -1,
//document_root: Root path of HTTP document, default path is ./
"document_root": "./",
//home_page: Set the HTML file of the home page, the default value is "index.html"
//If there isn't any handler registered to the path "/", the home page file in the "document_root" is send to clients as a response
//to the request for "/".
"home_page": "index.html",
//use_implicit_page: enable implicit pages if true, true by default
"use_implicit_page": true,
//implicit_page: Set the file which would the server access in a directory that a user accessed.
//For example, by default, http://localhost/a-directory resolves to http://localhost/a-directory/index.html.
"implicit_page": "index.html",
//static_file_headers: Headers for static files
/*"static_file_headers": [
{
"name": "field-name",
"value": "field-value"
}
],*/
//upload_path: The path to save the uploaded file. "uploads" by default.
//If the path isn't prefixed with /, ./ or ../,
//it is relative path of document_root path
"upload_path": "uploads",
/* file_types:
* HTTP download file types,The file types supported by drogon
* by default are "html", "js", "css", "xml", "xsl", "txt", "svg",
* "ttf", "otf", "woff2", "woff" , "eot", "png", "jpg", "jpeg",
* "gif", "bmp", "ico", "icns", etc. */
"file_types": [
"gif",
"png",
"jpg",
"js",
"css",
"html",
"ico",
"swf",
"xap",
"apk",
"cur",
"xml",
"webp",
"svg"
],
// mime: A dictionary that extends the internal MIME type support. Maps extensions into new MIME types
// note: This option only adds MIME to the sever. `file_types` above have to be set for the server to serve them.
"mime": {
// "text/markdown": "md",
// "text/gemini": ["gmi", "gemini"]
},
//locations: An array of locations of static files for GET requests.
"locations": [
{
//uri_prefix: The URI prefix of the location prefixed with "/", the default value is "" that disables the location.
//"uri_prefix": "/.well-known/acme-challenge/",
//default_content_type: The default content type of the static files without
//an extension. empty string by default.
"default_content_type": "text/plain",
//alias: The location in file system, if it is prefixed with "/", it
//presents an absolute path, otherwise it presents a relative path to
//the document_root path.
//The default value is "" which means use the document root path as the location base path.
"alias": "",
//is_case_sensitive: indicates whether the URI prefix is case sensitive.
"is_case_sensitive": false,
//allow_all: true by default. If it is set to false, only static files with a valid extension can be accessed.
"allow_all": true,
//is_recursive: true by default. If it is set to false, files in sub directories can't be accessed.
"is_recursive": true,
//filters: string array, the filters applied to the location.
"filters": []
}
],
//max_connections: maximum number of connections, 100000 by default
"max_connections": 100000,
//max_connections_per_ip: maximum number of connections per client, 0 by default which means no limit
"max_connections_per_ip": 0,
//Load_dynamic_views: False by default, when set to true, drogon
//compiles and loads dynamically "CSP View Files" in directories defined
//by "dynamic_views_path"
"load_dynamic_views": false,
//dynamic_views_path: If the path isn't prefixed with /, ./ or ../,
//it is relative path of document_root path
"dynamic_views_path": [
"./views"
],
//dynamic_views_output_path: Default by an empty string which means the output path of source
//files is the path where the csp files locate. If the path isn't prefixed with /, it is relative
//path of the current working directory.
"dynamic_views_output_path": "",
//json_parser_stack_limit: 1000 by default, the maximum number of stack depth when reading a json string by the jsoncpp library.
"json_parser_stack_limit": 1000,
//enable_unicode_escaping_in_json: true by default, enable unicode escaping in json.
"enable_unicode_escaping_in_json": true,
//float_precision_in_json: set precision of float number in json.
"float_precision_in_json": {
//precision: 0 by default, 0 means use the default precision of the jsoncpp lib.
"precision": 0,
//precision_type: must be "significant" or "decimal", defaults to "significant" that means
//setting max number of significant digits in string, "decimal" means setting max number of
//digits after "." in string
"precision_type": "significant"
},
//log: Set log output, drogon output logs to stdout by default
"log": {
//use_spdlog: Use spdlog library to log
"use_spdlog": false,
//log_path: Log file path,empty by default,in which case,logs are output to the stdout
//"log_path": "./",
//logfile_base_name: Log file base name,empty by default which means drogon names logfile as
//drogon.log ...
"logfile_base_name": "",
//log_size_limit: 100000000 bytes by default,
//When the log file size reaches "log_size_limit", the log file is switched.
"log_size_limit": 100000000,
//max_files: 0 by default,
//When the number of old log files exceeds "max_files", the oldest file will be deleted. 0 means never delete.
"max_files": 0,
//log_level: "DEBUG" by default,options:"TRACE","DEBUG","INFO","WARN"
//The TRACE level is only valid when built in DEBUG mode.
"log_level": "DEBUG",
//display_local_time: false by default, if true, the log time is displayed in local time
"display_local_time": false
},
//run_as_daemon: False by default
"run_as_daemon": false,
//handle_sig_term: True by default
"handle_sig_term": true,
//relaunch_on_error: False by default, if true, the program will be restart by the parent after exiting;
"relaunch_on_error": false,
//use_sendfile: True by default, if true, the program
//uses sendfile() system-call to send static files to clients;
"use_sendfile": true,
//use_gzip: True by default, use gzip to compress the response body's content;
"use_gzip": true,
//use_brotli: False by default, use brotli to compress the response body's content;
"use_brotli": false,
//static_files_cache_time: 5 (seconds) by default, the time in which the static file response is cached,
//0 means cache forever, the negative value means no cache
"static_files_cache_time": 5,
//simple_controllers_map: Used to configure mapping from path to simple controller
//"simple_controllers_map": [
// {
// "path": "/path/name",
// "controller": "controllerClassName",
// "http_methods": [
// "get",
// "post"
// ],
// "filters": [
// "FilterClassName"
// ]
// }
//],
//idle_connection_timeout: Defaults to 60 seconds, the lifetime
//of the connection without read or write
"idle_connection_timeout": 60,
//server_header_field: Set the 'Server' header field in each response sent by drogon,
//empty string by default with which the 'Server' header field is set to "Server: drogon/version string\r\n"
"server_header_field": "",
//enable_server_header: Set true to force drogon to add a 'Server' header to each HTTP response. The default
//value is true.
"enable_server_header": true,
//enable_date_header: Set true to force drogon to add a 'Date' header to each HTTP response. The default
//value is true.
"enable_date_header": true,
//keepalive_requests: Set the maximum number of requests that can be served through one keep-alive connection.
//After the maximum number of requests are made, the connection is closed.
//The default value of 0 means no limit.
"keepalive_requests": 0,
//pipelining_requests: Set the maximum number of unhandled requests that can be cached in pipelining buffer.
//After the maximum number of requests are made, the connection is closed.
//The default value of 0 means no limit.
"pipelining_requests": 0,
//gzip_static: If it is set to true, when the client requests a static file, drogon first finds the compressed
//file with the extension ".gz" in the same path and send the compressed file to the client.
//The default value of gzip_static is true.
"gzip_static": true,
//br_static: If it is set to true, when the client requests a static file, drogon first finds the compressed
//file with the extension ".br" in the same path and send the compressed file to the client.
//The default value of br_static is true.
"br_static": true,
//client_max_body_size: Set the maximum body size of HTTP requests received by drogon. The default value is "1M".
//One can set it to "1024", "1k", "10M", "1G", etc. Setting it to "" means no limit.
"client_max_body_size": "1M",
//max_memory_body_size: Set the maximum body size in memory of HTTP requests received by drogon. The default value is "64K" bytes.
//If the body size of a HTTP request exceeds this limit, the body is stored to a temporary file for processing.
//Setting it to "" means no limit.
"client_max_memory_body_size": "64K",
//client_max_websocket_message_size: Set the maximum size of messages sent by WebSocket client. The default value is "128K".
//One can set it to "1024", "1k", "10M", "1G", etc. Setting it to "" means no limit.
"client_max_websocket_message_size": "128K",
//reuse_port: Defaults to false, users can run multiple processes listening on the same port at the same time.
"reuse_port": false,
// enabled_compressed_request: Defaults to false. If true the server will automatically decompress compressed request bodies.
// Currently only gzip and br are supported. Note: max_memory_body_size and max_body_size applies twice for compressed requests.
// Once when receiving and once when decompressing. i.e. if the decompressed body is larger than max_body_size, the request
// will be rejected.
"enabled_compressed_request": false,
// enable_request_stream: Defaults to false. If true the server will enable stream mode for http requests.
// See the wiki for more details.
"enable_request_stream": false,
},
//plugins: Define all plugins running in the application
"plugins": [
{
//name: The class name of the plugin
"name": "drogon::plugin::PromExporter",
//dependencies: Plugins that the plugin depends on. It can be commented out
"dependencies": [],
//config: The configuration of the plugin. This json object is the parameter to initialize the plugin.
//It can be commented out
"config": {
"path": "/metrics"
}
},
{
"name": "drogon::plugin::AccessLogger",
"dependencies": [],
"config": {
"use_spdlog": false,
"log_path": "",
"log_format": "",
"log_file": "access.log",
"log_size_limit": 0,
"use_local_time": true,
"log_index": 0,
// "show_microseconds": true,
// "custom_time_format": "",
// "use_real_ip": false
}
}
],
//custom_config: custom configuration for users. This object can be get by the app().getCustomConfig() method.
"custom_config": {}
}

313
SoftController/config.yaml Normal file
View File

@ -0,0 +1,313 @@
# This is a YAML format configuration file
# ssl:The global SSL settings. "key" and "cert" are the path to the SSL key and certificate. While
# "conf" is an array of 1 or 2-element tuples that supplies file style options for `SSL_CONF_cmd`.
# ssl:
# cert: ../../trantor/trantor/tests/server.crt
# key: ../../trantor/trantor/tests/server.key
# conf: [
# # [Options, -SessionTicket],
# # [Options, Compression]
# ]
# listeners:
# # address: Ip address,0.0.0.0 by default
# - address: 0.0.0.0
# # port: Port number
# port: 80
# # https: If true, use https for security,false by default
# https: false
# - address: 0.0.0.0
# port: 443
# https: true
# # cert,key: Cert file path and key file path, empty by default,
# # if empty, use the global setting
# cert: ''
# key: ''
# # use_old_tls: enable the TLS1.0/1.1, false by default
# use_old_tls: false
# ssl_conf: [
# # [MinProtocol, TLSv1.3]
# ]
# db_clients:
# # name: Name of the client,'default' by default
# - name: default
# # rdbms: Server type, postgresql,mysql or sqlite3, "postgresql" by default
# rdbms: postgresql
# # filename: Sqlite3 db file name
# # filename: ''
# # host: Server address,localhost by default
# host: 127.0.0.1
# # port: Server port, 5432 by default
# port: 5432
# # dbname: Database name
# dbname: test
# # user: 'postgres' by default
# user: ''
# # passwd: '' by default
# passwd: ''
# # is_fast: false by default, if it is true, the client is faster but user can't call
# # any synchronous interface of it.
# is_fast: false
# # client_encoding: The character set used by the client. it is empty string by default which
# # means use the default character set.
# # client_encoding: ''
# # number_of_connections: 1 by default, if the 'is_fast' is true, the number is the number of
# # connections per IO thread, otherwise it is the total number of all connections.
# number_of_connections: 1
# # timeout: -1 by default, in seconds, the timeout for executing a SQL query.
# # zero or negative value means no timeout.
# timeout: -1
# # auto_batch: this feature is only available for the PostgreSQL driver(version >= 14.0), see
# # the wiki for more details.
# auto_batch: false
# # connect_options: extra options for the connection. Only works for PostgreSQL now.
# # For more information, see https://www.postgresql.org/docs/16/libpq-connect.html#LIBPQ-CONNECT-OPTIONS
# # connect_options:
# # statement_timeout: '1s'
# redis_clients:
# # name: Name of the client,'default' by default
# - name: default
# # host: Server IP, 127.0.0.1 by default
# host: 127.0.0.1
# # port: Server port, 6379 by default
# port: 6379
# # username: '' by default which means 'default' in redis ACL
# username: ''
# # passwd: '' by default
# passwd: ''
# # db index: 0 by default
# db: 0
# # is_fast: false by default, if it is true, the client is faster but user can't call
# # any synchronous interface of it.
# is_fast: false
# # number_of_connections: 1 by default, if the 'is_fast' is true, the number is the number of
# # connections per IO thread, otherwise it is the total number of all connections.
# number_of_connections: 1
# # timeout: -1.0 by default, in seconds, the timeout for executing a command.
# # zero or negative value means no timeout.
# timeout: -1
app:
# number_of_threads: The number of IO threads, 1 by default, if the value is set to 0, the number of threads
# is the number of CPU cores
number_of_threads: 1
# enable_session: False by default
enable_session: false
session_timeout: 0
# string value of SameSite attribute of the Set-Cookie HTTP response header
# valid value is either 'Null' (default), 'Lax', 'Strict' or 'None'
session_same_site: 'Null'
# session_cookie_key: The cookie key of the session, "JSESSIONID" by default
session_cookie_key: 'JSESSIONID'
# session_max_age: The max age of the session cookie, -1 by default
session_max_age: -1
# document_root: Root path of HTTP document, default path is ./
document_root: ./
# home_page: Set the HTML file of the home page, the default value is "index.html"
# If there isn't any handler registered to the path "/", the home page file in the "document_root" is send to clients as a response
# to the request for "/".
home_page: index.html
# use_implicit_page: enable implicit pages if true, true by default
use_implicit_page: true
# implicit_page: Set the file which would the server access in a directory that a user accessed.
# For example, by default, http://localhost/a-directory resolves to http://localhost/a-directory/index.html.
implicit_page: index.html
# static_file_headers: Headers for static files
# static_file_headers:
# - name: field-name
# value: field-value
# upload_path: The path to save the uploaded file. "uploads" by default.
# If the path isn't prefixed with /, ./ or ../,
# it is relative path of document_root path
upload_path: uploads
# file_types:
# HTTP download file types,The file types supported by drogon
# by default are "html", "js", "css", "xml", "xsl", "txt", "svg",
# "ttf", "otf", "woff2", "woff" , "eot", "png", "jpg", "jpeg",
# "gif", "bmp", "ico", "icns", etc.
file_types:
- gif
- png
- jpg
- js
- css
- html
- ico
- swf
- xap
- apk
- cur
- xml
# mime: A dictionary that extends the internal MIME type support. Maps extensions into new MIME types
# note: This option only adds MIME to the sever. `file_types` above have to be set for the server to serve them.
mime: {
# text/markdown: md
# text/gemini:
# - gmi
# - gemini
}
# locations: An array of locations of static files for GET requests.
locations:
# uri_prefix: The URI prefix of the location prefixed with "/", the default value is "" that disables the location.
- uri_prefix: '' # /.well-known/acme-challenge/
# default_content_type: The default content type of the static files without
# an extension. empty string by default.
default_content_type: text/plain
# alias: The location in file system, if it is prefixed with "/", it
# presents an absolute path, otherwise it presents a relative path to
# the document_root path.
# The default value is "" which means use the document root path as the location base path.
alias: ''
# is_case_sensitive: indicates whether the URI prefix is case sensitive.
is_case_sensitive: false
# allow_all: true by default. If it is set to false, only static files with a valid extension can be accessed.
allow_all: true
# is_recursive: true by default. If it is set to false, files in sub directories can't be accessed.
is_recursive: true
# filters: string array, the filters applied to the location.
filters: []
# max_connections: maximum number of connections, 100000 by default
max_connections: 100000
# max_connections_per_ip: maximum number of connections per client, 0 by default which means no limit
max_connections_per_ip: 0
# Load_dynamic_views: False by default, when set to true, drogon
# compiles and loads dynamically "CSP View Files" in directories defined
# by "dynamic_views_path"
load_dynamic_views: false
# dynamic_views_path: If the path isn't prefixed with /, ./ or ../,
# it is relative path of document_root path
dynamic_views_path:
- ./views
# dynamic_views_output_path: Default by an empty string which means the output path of source
# files is the path where the csp files locate. If the path isn't prefixed with /, it is relative
# path of the current working directory.
dynamic_views_output_path: ''
# json_parser_stack_limit: 1000 by default, the maximum number of stack depth when reading a json string by the jsoncpp library.
json_parser_stack_limit: 1000
# enable_unicode_escaping_in_json: true by default, enable unicode escaping in json.
enable_unicode_escaping_in_json: true
# float_precision_in_json: set precision of float number in json.
float_precision_in_json:
# precision: 0 by default, 0 means use the default precision of the jsoncpp lib.
precision: 0
# precision_type: must be "significant" or "decimal", defaults to "significant" that means
# setting max number of significant digits in string, "decimal" means setting max number of
# digits after "." in string
precision_type: significant
# log: Set log output, drogon output logs to stdout by default
log:
# use_spdlog: Use spdlog library to log
use_spdlog: false
# log_path: Log file path,empty by default,in which case,logs are output to the stdout
# log_path: ./
# logfile_base_name: Log file base name,empty by default which means drogon names logfile as
# drogon.log ...
logfile_base_name: ''
# log_size_limit: 100000000 bytes by default,
# When the log file size reaches "log_size_limit", the log file is switched.
log_size_limit: 100000000
# max_files: 0 by default,
# When the number of old log files exceeds "max_files", the oldest file will be deleted. 0 means never delete.
max_files: 0
# log_level: "DEBUG" by default,options:"TRACE","DEBUG","INFO","WARN"
# The TRACE level is only valid when built in DEBUG mode.
log_level: DEBUG
# display_local_time: false by default, if true, the log time is displayed in local time
display_local_time: false
# run_as_daemon: False by default
run_as_daemon: false
# handle_sig_term: True by default
handle_sig_term: true
# relaunch_on_error: False by default, if true, the program will be restart by the parent after exiting;
relaunch_on_error: false
# use_sendfile: True by default, if true, the program
# uses sendfile() system-call to send static files to clients;
use_sendfile: true
# use_gzip: True by default, use gzip to compress the response body's content;
use_gzip: true
# use_brotli: False by default, use brotli to compress the response body's content;
use_brotli: false
# static_files_cache_time: 5 (seconds) by default, the time in which the static file response is cached,
# 0 means cache forever, the negative value means no cache
static_files_cache_time: 5
# simple_controllers_map: Used to configure mapping from path to simple controller
# simple_controllers_map:
# - path: /path/name
# controller: controllerClassName
# http_methods:
# - get
# - post
# filters:
# - FilterClassName
# idle_connection_timeout: Defaults to 60 seconds, the lifetime
# of the connection without read or write
idle_connection_timeout: 60
# server_header_field: Set the 'Server' header field in each response sent by drogon,
# empty string by default with which the 'Server' header field is set to "Server: drogon/version string\r\n"
server_header_field: ''
# enable_server_header: Set true to force drogon to add a 'Server' header to each HTTP response. The default
# value is true.
enable_server_header: true
# enable_date_header: Set true to force drogon to add a 'Date' header to each HTTP response. The default
# value is true.
enable_date_header: true
# keepalive_requests: Set the maximum number of requests that can be served through one keep-alive connection.
# After the maximum number of requests are made, the connection is closed.
# The default value of 0 means no limit.
keepalive_requests: 0
# pipelining_requests: Set the maximum number of unhandled requests that can be cached in pipelining buffer.
# After the maximum number of requests are made, the connection is closed.
# The default value of 0 means no limit.
pipelining_requests: 0
# gzip_static: If it is set to true, when the client requests a static file, drogon first finds the compressed
# file with the extension ".gz" in the same path and send the compressed file to the client.
# The default value of gzip_static is true.
gzip_static: true
# br_static: If it is set to true, when the client requests a static file, drogon first finds the compressed
# file with the extension ".br" in the same path and send the compressed file to the client.
# The default value of br_static is true.
br_static: true
# client_max_body_size: Set the maximum body size of HTTP requests received by drogon. The default value is "1M".
# One can set it to "1024", "1k", "10M", "1G", etc. Setting it to "" means no limit.
client_max_body_size: 1M
# max_memory_body_size: Set the maximum body size in memory of HTTP requests received by drogon. The default value is "64K" bytes.
# If the body size of a HTTP request exceeds this limit, the body is stored to a temporary file for processing.
# Setting it to "" means no limit.
client_max_memory_body_size: 64K
# client_max_websocket_message_size: Set the maximum size of messages sent by WebSocket client. The default value is "128K".
# One can set it to "1024", "1k", "10M", "1G", etc. Setting it to "" means no limit.
client_max_websocket_message_size: 128K
# reuse_port: Defaults to false, users can run multiple processes listening on the same port at the same time.
reuse_port: false
# enabled_compressed_request: Defaults to false. If true the server will automatically decompress compressed request bodies.
# Currently only gzip and br are supported. Note: max_memory_body_size and max_body_size applies twice for compressed requests.
# Once when receiving and once when decompressing. i.e. if the decompressed body is larger than max_body_size, the request
# will be rejected.
enabled_compressed_request: false
# enable_request_stream: Defaults to false. If true the server will enable stream mode for http requests.
# See the wiki for more details.
enable_request_stream: false
# plugins: Define all plugins running in the application
plugins:
# name: The class name of the plugin
- name: drogon::plugin::PromExporter
# dependencies: Plugins that the plugin depends on. It can be commented out
dependencies: []
# config: The configuration of the plugin. This json object is the parameter to initialize the plugin.
# It can be commented out
config:
path: /metrics
- name: drogon::plugin::AccessLogger
dependencies: []
config:
use_spdlog: false
log_path: ''
log_format: ''
log_file: access.log
log_size_limit: 0
use_local_time: true
log_index: 0
# show_microseconds: true
# custom_time_format: ''
# use_real_ip: false
# custom_config: custom configuration for users. This object can be get by the app().getCustomConfig() method.
custom_config: {}

89
SoftController/main.cpp Normal file
View File

@ -0,0 +1,89 @@
#include <drogon/drogon.h>
#include <ixwebsocket/IXWebSocket.h>
#include <iostream>
#include <thread>
#include <string>
#include <vector>
#include <utility>
#include <nlohmann/json.hpp>
#include <future>
#include "wsHandler/wsSessionHandler.h"
bool RunWsClient(const std::string& url, const std::string& inti_message)
{
bool result;
std::promise<void> finishPromise;
auto finishFuture = finishPromise.get_future();
// подключаемся как ws клиент к orm
ix::WebSocket webSocket;
webSocket.setUrl(url);
// настройка callback
webSocket.setOnMessageCallback([&webSocket, &inti_message, &url, &finishPromise, &result](const ix::WebSocketMessagePtr &msg) {
if (msg->type == ix::WebSocketMessageType::Open) {
std::cout << "Соединение c " + url + " установлено\n";
webSocket.send(inti_message);
std::cout << "Отправлено сообщение: " + inti_message << std::endl;
}
else if (msg->type == ix::WebSocketMessageType::Message) {
std::cout << "Получено сообщение: " << msg->str << std::endl;
// разбиваем строку на пары ключ- значение
auto json_msg = nlohmann::json::parse(msg->str);
std::vector<std::pair<std::string, std::string>> vector_msg;
for (auto& [key, value] : json_msg.items()) {
vector_msg.emplace_back(key, value.dump());
}
wsAnswerHandler(vector_msg, url);
finishPromise.set_value();
result = true;
}
else if (msg->type == ix::WebSocketMessageType::Error) {
std::cerr << "Ошибка: " << msg->errorInfo.reason << std::endl;
finishPromise.set_value();
result = false;
}
});
webSocket.start();
finishFuture.wait();
webSocket.stop();
return result;
}
int main() {
// соединение с БД re
// получаем данные о RE из БД
// re_peer =
// re_version =
// re_opc_server_peer =
// status =
std::string inti_messages[] = {"{ \"re_peer\": \"re.promuc.local\", \"re_version\": \"1.0.1\", \"re_opc_server_peer\": \"re.opc.promuc.local\", \"count_message\": 1, \"count_attempts\": 3, \"count_tags_conc\": 0, \"timeout_waiting_response\": 1000, \"status\": \"init_OK_AAA\" }",
"{ \"re_peer\": \"re.promuc.local\", \"re_version\": \"1.0.1\", \"re_opc_server_peer\": \"re.opc.promuc.local\", \"count_message\": 3, \"count_attempts\": 3, \"count_tags_conc\": 0, \"timeout_waiting_response\": 1000, \"status\": \"init_OK_AAA\" }",
"{ \"re_peer\": \"re.promuc.local\", \"re_version\": \"1.0.1\", \"re_opc_server_peer\": \"re.opc.promuc.local\", \"count_message\": 7, \"count_attempts\": 3, \"count_tags_conc\": 0, \"timeout_waiting_response\": 1000, \"status\": \"init_OK_AAA\" }"};
std::string SD_endpoints[] = {"ws://localhost:8080/SC_SD_F1",
"ws://localhost:8080/SC_SD_F2",
"ws://localhost:8080/SC_SD_F3"};
for(int i = 0; i < 3; i ++)
{
bool ws_conn_result = RunWsClient(SD_endpoints[i], inti_messages[i]);
while(!ws_conn_result){
std::this_thread::sleep_for(std::chrono::seconds(1));
ws_conn_result = RunWsClient(SD_endpoints[i], inti_messages[i]);
}
}
// запускаем SC как веб- сервер
drogon::app().addListener("0.0.0.0", 4343);
drogon::app().run();
return 0;
}

View File

@ -0,0 +1,104 @@
{
//rdbms: server type, postgresql,mysql or sqlite3
"rdbms": "postgresql",
//filename: sqlite3 db file name
//"filename":"",
//host: server address,localhost by default;
"host": "127.0.0.1",
//port: server port, 5432 by default;
"port": 5432,
//dbname: Database name;
"dbname": "",
//schema: valid for postgreSQL, "public" by default;
"schema": "public",
//user: User name
"user": "",
//password or passwd: Password
"password": "",
//client_encoding: The character set used by drogon_ctl. it is empty string by default which
//means use the default character set.
//"client_encoding": "",
//table: An array of tables to be modelized. if the array is empty, all revealed tables are modelized.
"tables": [],
//convert: the value can be changed by a function call before it is stored into database or
//after it is read from database
"convert": {
"enabled": false,
"items":[{
"table": "user",
"column": "password",
"method": {
//after_db_read: name of the method which is called after reading from database, signature: void([const] std::shared_ptr [&])
"after_db_read": "decrypt_password",
//before_db_write: name of the method which is called before writing to database, signature: void([const] std::shared_ptr [&])
"before_db_write": "encrypt_password"
},
"includes": [
"\"file_local_search_path.h\"","<file_in_global_search_path.h>"
]
}]
},
"relationships": {
"enabled": false,
"items": [{
"type": "has one",
"original_table_name": "products",
"original_table_alias": "product",
"original_key": "id",
"target_table_name": "skus",
"target_table_alias": "SKU",
"target_key": "product_id",
"enable_reverse": true
},
{
"type": "has many",
"original_table_name": "products",
"original_table_alias": "product",
"original_key": "id",
"target_table_name": "reviews",
"target_table_alias": "",
"target_key": "product_id",
"enable_reverse": true
},
{
"type": "many to many",
"original_table_name": "products",
"original_table_alias": "",
"original_key": "id",
"pivot_table": {
"table_name": "carts_products",
"original_key": "product_id",
"target_key": "cart_id"
},
"target_table_name": "carts",
"target_table_alias": "",
"target_key": "id",
"enable_reverse": true
}
]
},
"restful_api_controllers": {
"enabled": false,
// resource_uri: The URI to access the resource, the default value
// is '/*' in which the asterisk represents the table name.
// If this option is set to a empty string, the URI is composed of the namespaces and the class name.
"resource_uri": "/*",
// class_name: "Restful*Ctrl" by default, the asterisk represents the table name.
// This option can contain namespaces.
"class_name": "Restful*Ctrl",
// filters: an array of filter names.
"filters": [],
// db_client: the database client used by the controller. this option must be consistent with
// the configuration of the application.
"db_client": {
//name: Name of the client,'default' by default
"name": "default",
//is_fast:
"is_fast": false
},
// directory: The directory where the controller source files are stored.
"directory": "controllers",
// generate_base_only: false by default. Set to true to avoid overwriting custom subclasses.
"generate_base_only": false
}
}

View File

@ -0,0 +1,14 @@
cmake_minimum_required(VERSION 3.5)
project(SoftController_test CXX)
add_executable(${PROJECT_NAME} test_main.cc)
# ##############################################################################
# If you include the drogon source code locally in your project, use this method
# to add drogon
# target_link_libraries(${PROJECT_NAME} PRIVATE drogon)
#
# and comment out the following lines
target_link_libraries(${PROJECT_NAME} PRIVATE Drogon::Drogon)
ParseAndAddDrogonTests(${PROJECT_NAME})

View File

@ -0,0 +1,32 @@
#define DROGON_TEST_MAIN
#include <drogon/drogon_test.h>
#include <drogon/drogon.h>
DROGON_TEST(BasicTest)
{
// Add your tests here
}
int main(int argc, char** argv)
{
using namespace drogon;
std::promise<void> p1;
std::future<void> f1 = p1.get_future();
// Start the main loop on another thread
std::thread thr([&]() {
// Queues the promise to be fulfilled after starting the loop
app().getLoop()->queueInLoop([&p1]() { p1.set_value(); });
app().run();
});
// The future is only satisfied after the event loop started
f1.get();
int status = test::run(argc, argv);
// Ask the event loop to shutdown and wait
app().getLoop()->queueInLoop([]() { app().quit(); });
thr.join();
return status;
}

View File

@ -0,0 +1,6 @@
#include "wsSessionHandler.h"
void wsAnswerHandler(std::vector<std::pair<std::string, std::string>> msg, std::string url)
{
}

View File

@ -0,0 +1,9 @@
#pragma once
#ifndef SOFTCONTROLLER_WSSESSIONHANDLER_H
#define SOFTCONTROLLER_WSSESSIONHANDLER_H
#endif //SOFTCONTROLLER_WSSESSIONHANDLER_H
#include <string>
#include <vector>
void wsAnswerHandler(std::vector<std::pair<std::string, std::string>> msg, std::string url);