Files
allwpilib/wpiutil/src/main/native/cpp/MulticastHandleManager.h
2021-11-25 22:08:26 -08:00

26 lines
727 B
C++

// Copyright (c) FIRST and other WPILib contributors.
// Open Source Software; you can modify and/or share it under the terms of
// the WPILib BSD license file in the root directory of this project.
#pragma once
#include <memory>
#include "wpi/DenseMap.h"
#include "wpi/MulticastServiceAnnouncer.h"
#include "wpi/MulticastServiceResolver.h"
#include "wpi/UidVector.h"
namespace wpi {
struct MulticastHandleManager {
wpi::mutex mutex;
wpi::UidVector<int, 8> handleIds;
wpi::DenseMap<size_t, std::unique_ptr<wpi::MulticastServiceResolver>>
resolvers;
wpi::DenseMap<size_t, std::unique_ptr<wpi::MulticastServiceAnnouncer>>
announcers;
};
MulticastHandleManager& GetMulticastManager();
} // namespace wpi