I am making an application that works in three different parts. One server running in C ++ and two clients running in C # and Python. The client connects to the server and sends a message.
To do this I have opted for ZeroMQ.
Because this is a POC, the code is simple.
Server Code (C++) (cppzmq)
zmq::context_t context{ 1 };
zmq::socket_t socket{ context, zmq::socket_type::rep };
socket.bind("tcp://*:5555");
zmq::message_t request;
socket.recv(request, zmq::recv_flags::none);
Python Client (pyzm)
context = zmq.Context()
socket = context.socket(zmq.REQ)
socket.connect("tcp://localhost:5555")
socket.send(b"Hello")
C# client (NetMQ)
using(var socket = new RequestSocket())
{
socket.Connect("tcp://localhost:5555");
byte[] msg = Encoding.ASCII.GetBytes("HEllo");
socket.SendFrame(msg);
}
The connection between the Python client and the server is successful and the server receives the message sent by the client. But the connection between C # client and server is not correct. On the C # side it is assumed that you have successfully connected and transmitted the message, but the server does not reflect any changes (as if you did not receive a call).
What can be the cause?