AsyncFw 1.2
Async Framework is c++ runtime with timers, poll notifiers, sockets, coroutines, etc.
 
Loading...
Searching...
No Matches
RrdClient.h
1/*
2Copyright (c) 2026 Alexandr Kuzmuk
3
4This file is part of the AsyncFw project. Licensed under the MIT License.
5See {Link: LICENSE file https://mit-license.org} in the project root for full license information.
6*/
7
8#pragma once
9
10#include "../core/FunctionConnector.h"
11
12namespace AsyncFw {
13class Rrd;
14class DataArray;
15class TlsContext;
16class DataArraySocket;
17
19class RrdClient {
20public:
21 RrdClient(DataArraySocket *, const std::vector<Rrd *> &);
22 ~RrdClient();
23 void clear(int);
24
25 void connectToHost(const std::string &, uint16_t);
26 void connectToHost();
27 void disconnectFromHost();
28 int transmit(const DataArray &, uint32_t, bool = false);
29
30 void tlsSetup(const TlsContext &);
31 void disableTls();
32
33private:
34 std::vector<Rrd *> rrd_;
35 DataArraySocket *tcpSocket;
36 int requestTimerId;
37 std::vector<uint64_t> lastTime;
38 void tcpReadWrite(const DataArray *, uint32_t);
39 void request(int);
40 FunctionConnectionGuardList gl_;
41};
42} // namespace AsyncFw
The DataArraySocket class.
Definition DataArraySocket.h:17
The DataArray class.
Definition DataArray.h:20
The Rrd class.
Definition Rrd.h:16
The TlsContext class provides functionality for managing TLS certificates.
Definition TlsContext.h:24