ADD: added possible using of a message handle whitch is not testet yet

This commit is contained in:
Henry Winkel
2023-08-09 17:06:43 +02:00
parent e01cc3a562
commit 424c4dca15

View File

@@ -12,7 +12,7 @@ namespace DirectCommunication
DirectCommunicationServer::DirectCommunicationServer(ushort port):port_(port) DirectCommunicationServer::DirectCommunicationServer(ushort port):port_(port)
{ {
context_ = zmq::context_t(1); context_ = zmq::context_t();
socket_ = zmq::socket_t(context_,zmq::socket_type::server); socket_ = zmq::socket_t(context_,zmq::socket_type::server);
socket_.bind("tcp://*:"+std::to_string(port_)); socket_.bind("tcp://*:"+std::to_string(port_));
@@ -93,6 +93,7 @@ namespace DirectCommunication
{ {
if (MessageHandle_ != nullptr) if (MessageHandle_ != nullptr)
{ {
LOG_S(INFO)<<"using handle";
MessageHandle_(msg.to_string()); MessageHandle_(msg.to_string());
} }
else else