mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-27 02:01:42 +00:00
[wpinet] Move network portions of wpiutil into new wpinet library (#4077)
This commit is contained in:
26
wpinet/src/main/native/cpp/MulticastHandleManager.h
Normal file
26
wpinet/src/main/native/cpp/MulticastHandleManager.h
Normal file
@@ -0,0 +1,26 @@
|
||||
// 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/UidVector.h>
|
||||
|
||||
#include "wpinet/MulticastServiceAnnouncer.h"
|
||||
#include "wpinet/MulticastServiceResolver.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
|
||||
Reference in New Issue
Block a user