 |
Diarkis C++Client Library API Document
|
Go to the documentation of this file.
8 #include "logging/LoggerFactory.h"
46 virtual void Setup(
const std::shared_ptr<LoggerFactory>& loggerFactory);
60 bool Connect(
const char* endpoint,
const char* clientKey,
const struct AuthInfo* auth);
68 bool Connect(
const std::string& endpoint,
const std::string& clientKey,
const struct AuthInfo* auth);
88 bool Connect(
const char* endpoint,
89 const std::string& clientKey,
90 const std::vector<uint8_t>& sid,
91 const std::vector<uint8_t>& key,
92 const std::vector<uint8_t>& iv,
93 const std::vector<uint8_t>& mackey);
111 bool ConnectAsync(
const char* endpoint,
const char* clientKey,
const struct AuthInfo* auth);
119 bool ConnectAsync(
const std::string& endpoint,
const std::string& clientKey,
const struct AuthInfo* auth);
137 bool ConnectDualModeAsync(
const char* endpoint,
const char* clientKey,
const struct AuthInfo* auth);
145 bool ConnectDualModeAsync(
const std::string& endpoint,
const std::string& clientKey,
const struct AuthInfo* auth);
163 bool IsAsyncConnectRunning()
const;
199 void SetSchedulerAddNotifyEvent(std::function<
void()> notifyEventFunc);
215 std::shared_ptr<IDiarkisUdp>
Get();
261 bool SendMigrate(
void);
269 void ClearUdpBuffer(
void);
285 bool SetSendThreadParam(
const DiarkisThreadScheduler& scheduler);
301 bool SetRecvThreadParam(
const DiarkisThreadScheduler& scheduler);
311 Result SendCheckNATType();
328 virtual void OnDisconnect(
bool isReconnect);
336 virtual void OnOffline(
void);
410 bool SetConnectionInfo(
const char* clientKey,
417 const uint8_t* mackey,
438 std::shared_ptr<IDiarkisUdp>
udp_;
Arguments of the callback event called when an UDP Ping is received.
Definition: eventArgs.h:1454
DiarkisTransportType
Protocol type.
Definition: transport.h:27
Diarkis::StdString ownGlobalAddress_
My global IP address.
Definition: DiarkisUdpBase.h:478
Contains information about a specific result value. Can be compared against another Result structure....
Definition: result.h:37
Diarkis::StdVector< std::function< void()> > eventUnsubscriptions_
List of lambda functions.
Definition: DiarkisUdpBase.h:454
Arguments of the callback events when connecting to the server.
Definition: eventArgs.h:153
std::shared_ptr< IDiarkisLogger > logger_
Pointer to IDiarkisLogger class.
Definition: DiarkisUdpBase.h:446
Argument of the callback event called when a UDP or TCP Response is received.
Definition: eventArgs.h:1365
Base class that wraps the IDiarkisUdp class for easy use of UDP functionality.
Definition: DiarkisUdpBase.h:17
Arguments of the callback event called when an UDP Echo is received.
Definition: eventArgs.h:1421
std::shared_ptr< IDiarkisUdp > udp_
Pointer to IDiarkisUdp class.
Definition: DiarkisUdpBase.h:438
std::function< void()> schedulerAddNotifyEventFunc_
Sets the process to be called when UDP related events are added to a scheduler.
Definition: DiarkisUdpBase.h:462
#define DIARKIS_API
Definition: common.h:47
bool bOffline_
Whether the server is getting ready to shut down.
Definition: DiarkisUdpBase.h:470
Arguments of the callback event called when the response of Diarkis::Modules::IDiarkisRoom::SendCheck...
Definition: eventArgs.h:1487
Argument of the callback event called when a UDP or TCP Push is received.
Definition: eventArgs.h:1316