James Kuszmaul | cf32412 | 2023-01-14 14:07:17 -0800 | [diff] [blame^] | 1 | // Copyright (c) FIRST and other WPILib contributors. |
| 2 | // Open Source Software; you can modify and/or share it under the terms of |
| 3 | // the WPILib BSD license file in the root directory of this project. |
| 4 | |
| 5 | #pragma once |
| 6 | |
| 7 | #include <memory> |
| 8 | |
| 9 | #include <wpi/DenseMap.h> |
| 10 | #include <wpi/UidVector.h> |
| 11 | |
| 12 | #include "wpinet/MulticastServiceAnnouncer.h" |
| 13 | #include "wpinet/MulticastServiceResolver.h" |
| 14 | |
| 15 | namespace wpi { |
| 16 | struct MulticastHandleManager { |
| 17 | wpi::mutex mutex; |
| 18 | wpi::UidVector<int, 8> handleIds; |
| 19 | wpi::DenseMap<size_t, std::unique_ptr<wpi::MulticastServiceResolver>> |
| 20 | resolvers; |
| 21 | wpi::DenseMap<size_t, std::unique_ptr<wpi::MulticastServiceAnnouncer>> |
| 22 | announcers; |
| 23 | }; |
| 24 | |
| 25 | MulticastHandleManager& GetMulticastManager(); |
| 26 | } // namespace wpi |