Change bind and connect socket helper functions to take string

This commit is contained in:
2021-01-19 12:59:50 +01:00
parent a3d0286250
commit ccca4225d4
5 changed files with 15 additions and 9 deletions
+7 -2
View File
@@ -36,9 +36,14 @@ namespace BufferUtils
void create_destination_folder(const std::string& output_file);
void* bind_socket(
void* ctx, const std::string& detector_name, const int source_id);
void* ctx,
const std::string& detector_name,
const std::string& stream_name);
void* connect_socket(
void* ctx, const std::string& detector_name, const int source_id);
void* ctx,
const std::string& detector_name,
const std::string& stream_name);
DetectorConfig read_json_config(const std::string& filename);
}
+4 -4
View File
@@ -69,11 +69,11 @@ void BufferUtils::create_destination_folder(const string& output_file)
}
void* BufferUtils::connect_socket(
void* ctx, const string& detector_name, const int source_id)
void* ctx, const string& detector_name, const string& stream_name)
{
string ipc_address = BUFFER_LIVE_IPC_URL +
detector_name + "-" +
to_string(source_id);
stream_name;
void* socket = zmq_socket(ctx, ZMQ_SUB);
if (socket == nullptr) {
@@ -102,11 +102,11 @@ void* BufferUtils::connect_socket(
}
void* BufferUtils::bind_socket(
void* ctx, const string& detector_name, const int source_id)
void* ctx, const string& detector_name, const string& stream_name)
{
string ipc_address = BUFFER_LIVE_IPC_URL +
detector_name + "-" +
to_string(source_id);
stream_name;
void* socket = zmq_socket(ctx, ZMQ_PUB);