Austin Schuh | 75263e3 | 2022-02-22 18:05:32 -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/MulticastServiceAnnouncer.h" |
| 11 | #include "wpi/MulticastServiceResolver.h" |
| 12 | #include "wpi/UidVector.h" |
| 13 | |
| 14 | namespace wpi { |
| 15 | struct MulticastHandleManager { |
| 16 | wpi::mutex mutex; |
| 17 | wpi::UidVector<int, 8> handleIds; |
| 18 | wpi::DenseMap<size_t, std::unique_ptr<wpi::MulticastServiceResolver>> |
| 19 | resolvers; |
| 20 | wpi::DenseMap<size_t, std::unique_ptr<wpi::MulticastServiceAnnouncer>> |
| 21 | announcers; |
| 22 | }; |
| 23 | |
| 24 | MulticastHandleManager& GetMulticastManager(); |
| 25 | } // namespace wpi |