21 lines
526 B
C++
21 lines
526 B
C++
// Copyright (2019-2022) Paul Scherrer Institute
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#ifndef JUNGFRAUJOCH_UDPRECEIVER_H
|
|
#define JUNGFRAUJOCH_UDPRECEIVER_H
|
|
|
|
#include <future>
|
|
#include "ProcessJFPacket.h"
|
|
|
|
class UdpReceiver {
|
|
std::vector<std::future<void>> futures;
|
|
bool cancel = false;
|
|
void Run(uint16_t udp_port_number, ProcessJFPacket *process);
|
|
public:
|
|
UdpReceiver(uint16_t udp_port_number, ProcessJFPacket &process, uint32_t nthreads);
|
|
~UdpReceiver();
|
|
};
|
|
|
|
|
|
#endif //JUNGFRAUJOCH_UDPRECEIVER_H
|