@@ -196,9 +196,6 @@ class RISTNetReceiver {
196196 */
197197 static void getVersion (uint32_t &rCppWrapper, uint32_t &rRistMajor, uint32_t &rRistMinor);
198198
199- // To be implemented
200- // void getInfo();
201-
202199 /* *
203200 * @brief Data receive callback
204201 *
@@ -242,6 +239,9 @@ class RISTNetReceiver {
242239 // / Callback handling disconnecting clients
243240 std::function<void (const std::shared_ptr<NetworkConnection>&, const rist_peer&)> clientDisconnectedCallback = nullptr ;
244241
242+ // / Callback for statistics, called once every second
243+ std::function<void (const rist_stats& statistics)> statisticsCallback = nullptr ;
244+
245245 // Delete copy and move constructors and assign operators
246246 RISTNetReceiver (RISTNetReceiver const &) = delete ; // Copy construct
247247 RISTNetReceiver (RISTNetReceiver &&) = delete ; // Move construct
@@ -265,11 +265,14 @@ class RISTNetReceiver {
265265 // Private method called when a client disconnects
266266 static int clientDisconnect (void *pArg, rist_peer *pPeer);
267267
268+ // Private method called when a statistics are delivered
269+ static int gotStatistics (void *pArg, const rist_stats *stats);
270+
268271 // The context of a RIST receiver
269272 rist_ctx *mRistContext = nullptr ;
270273
271274 // The configuration of the RIST receiver
272- rist_peer_config mRistPeerConfig = { 0 };
275+ rist_peer_config mRistPeerConfig { };
273276
274277 // The mutex protecting the list. since the list can be accessed from both librist and the C++ layer
275278 std::mutex mClientListMtx ;
@@ -434,9 +437,6 @@ class RISTNetSender {
434437 */
435438 static void getVersion (uint32_t &rCppWrapper, uint32_t &rRistMajor, uint32_t &rRistMinor);
436439
437- // To be implemented
438- // void getInfo();
439-
440440 /* *
441441 * @brief OOB Data receive callback (__NULLABLE)
442442 *
@@ -467,6 +467,9 @@ class RISTNetSender {
467467 // / Callback handling disconnecting clients
468468 std::function<void (const std::shared_ptr<NetworkConnection>&, const rist_peer&)> clientDisconnectedCallback = nullptr ;
469469
470+ // / Callback for statistics, called once every second
471+ std::function<void (const rist_stats& statistics)> statisticsCallback = nullptr ;
472+
470473 // Delete copy and move constructors and assign operators
471474 RISTNetSender (RISTNetSender const &) = delete ; // Copy construct
472475 RISTNetSender (RISTNetSender &&) = delete ; // Move construct
@@ -487,11 +490,14 @@ class RISTNetSender {
487490 // Private method called when a client disconnects
488491 static int clientDisconnect (void *pArg, rist_peer *pPeer);
489492
493+ // Private method called when statistics are delivered
494+ static int gotStatistics (void *pArg, const rist_stats *stats);
495+
490496 // The context of a RIST sender
491497 rist_ctx *mRistContext = nullptr ;
492498
493499 // The configuration of the RIST sender
494- rist_peer_config mRistPeerConfig = { 0 };
500+ rist_peer_config mRistPeerConfig { };
495501
496502 // The mutex protecting the list. since the list can be accessed from both librist and the C++ layer
497503 std::mutex mClientListMtx ;
0 commit comments