File tree Expand file tree Collapse file tree 6 files changed +460
-36
lines changed
Expand file tree Collapse file tree 6 files changed +460
-36
lines changed Original file line number Diff line number Diff line change 3131 name : ${{ matrix.name }}
3232 pkg : ${{ matrix.pkg }}
3333 run : |
34- sudo apt install -y libev-dev
34+ sudo apt install -y libev-dev libinih-dev
3535 [ -n "$pkg" ] && sudo apt install -y $pkg
3636 [ "$name" = "none" ] && cmake . -DSSL_SUPPORT=OFF || cmake . -DUSE_$name=ON
3737 make
Original file line number Diff line number Diff line change @@ -128,6 +128,7 @@ Trusted by leading technology companies:
128128### C Client Dependencies
129129- ** Required:**
130130 - [ libev] - High-performance event loop library
131+ - [ inih] ( https://github.com/benhoyt/inih ) - Lightweight INI parser for loading rtty config file
131132- ** Optional (for SSL support):**
132133 - [ mbedtls(polarssl)] - Lightweight SSL/TLS library
133134 - [ CyaSSl(wolfssl)] - Embedded SSL/TLS library
Original file line number Diff line number Diff line change @@ -126,6 +126,7 @@ rtty 非常适合远程维护和管理大规模分布式Linux设备,是企业
126126### C 语言客户端依赖
127127- ** 必需组件**
128128 - [ libev] - 高性能事件循环库
129+ - [ inih] ( https://github.com/benhoyt/inih ) - 轻量级 INI 解析库,用于加载 rtty 配置文件
129130- ** 可选组件(SSL支持)**
130131 - [ mbedtls(polarssl)] - 轻量级SSL/TLS库
131132 - [ CyaSSl(wolfssl)] - 嵌入式SSL/TLS库
Original file line number Diff line number Diff line change 1+ ; rtty configuration example
2+ ; Priority: defaults < config file < command line
3+
4+ [rtty]
5+ id = device-001
6+ group = default
7+ host = 127.0.0.1
8+ port = 5912
9+ heartbeat = 30
10+ http-timeout = 30
11+ description = edge gateway in room A
12+ token = your-token
13+ username = root
14+ reconnect = true
15+ verbose = false
16+ background = false
17+
18+ [ssl]
19+ enabled = false
20+ insecure = false
21+ ; cacert = /etc/ssl/certs/ca-certificates.crt
22+ ; cert = /etc/rtty/client.crt
23+ ; key = /etc/rtty/client.key
Original file line number Diff line number Diff line change @@ -3,18 +3,30 @@ set(RTTY_VERSION_MAJOR 9)
33set (RTTY_VERSION_MINOR 0)
44set (RTTY_VERSION_PATCH 4)
55
6+ include (FindPkgConfig )
7+
68# Check the third party Libraries
79find_package (Libev REQUIRED )
810
11+ pkg_search_module (LIBINIH inih )
12+ if (NOT LIBINIH_FOUND)
13+ message (FATAL_ERROR "libinih is required." )
14+ endif ()
15+
916aux_source_directory (. SRCS )
1017aux_source_directory (log SRCS )
1118aux_source_directory (buffer SRCS )
1219
1320add_executable (rtty ${SRCS} )
1421target_compile_definitions (rtty PRIVATE _GNU_SOURCE )
1522target_compile_options (rtty PRIVATE -O -Wall -Werror --std=gnu99 )
16- target_include_directories (rtty PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_SOURCE_DIR} /buffer ${LIBEV_INCLUDE_DIR} )
17- target_link_libraries (rtty PRIVATE ${LIBEV_LIBRARY} util crypt m )
23+ target_include_directories (rtty PRIVATE
24+ ${CMAKE_CURRENT_BINARY_DIR}
25+ ${CMAKE_CURRENT_SOURCE_DIR} /buffer
26+ ${LIBEV_INCLUDE_DIR}
27+ ${LIBINIH_INCLUDE_DIRS}
28+ )
29+ target_link_libraries (rtty PRIVATE ${LIBEV_LIBRARY} ${LIBINIH_LIBRARIES} util crypt m )
1830
1931add_subdirectory (ssl )
2032
You can’t perform that action at this time.
0 commit comments