Move UDP recv parameter to core-buffer

This commit is contained in:
2020-04-29 17:34:26 +02:00
parent 1abaacdf55
commit 6949fe28fb
3 changed files with 6 additions and 3 deletions
+2 -3
View File
@@ -1,9 +1,8 @@
#ifndef UDPRECEIVER_H
#define UDPRECEIVER_H
#include "config.hpp"
#include <sys/socket.h>
#include "RingBuffer.hpp"
#include "buffer_config.hpp"
class UdpReceiver {
@@ -18,7 +17,7 @@ public:
void bind(
const uint16_t port,
const size_t usec_timeout=config::udp_usec_timeout);
const size_t usec_timeout=core_buffer::BUFFER_UDP_US_TIMEOUT);
void close();
};
+3
View File
@@ -28,6 +28,9 @@ namespace core_buffer {
// Size of sf_buffer RB in elements.
const size_t BUFFER_RB_SIZE = 1000;
// Microseconds timeout for UDP recv.
const int BUFFER_UDP_US_TIMEOUT = 10 * 1000;
// ZMQ threads for receiving data from sf_replay.
const int WRITER_ZMQ_IO_THREADS = 2;
+1
View File
@@ -2,6 +2,7 @@
#include <iostream>
#include "UdpReceiver.hpp"
#include "jungfrau.hpp"
#include "date.h"
using namespace std;