blob: 8c070f74a604de84b072ffee754297d824c9635f [file] [log] [blame]
James Kuszmaulcf324122023-01-14 14:07:17 -08001// 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
15namespace wpi {
16struct 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
25MulticastHandleManager& GetMulticastManager();
26} // namespace wpi