I am sending a protocol buffer message from .Net client to Cpp server. Both are using ZeroMQ but with different APIs.
The message looks something like this
req.proto
message PBRequest {
int num = 1;
string text = 2;
}
this is the .Net client
using NetMQ;
using NetMQ.Sockets;
/// ....
PBRequest req = new PBRequest();
req.Num = 10;
req.Text = "ciao";
Console.WriteLine("sending request" + req.ToString());
using (var socket = new RequestSocket()) {
socket.Connect("tcp://localhost:8000"); // any address would do, as long as it's available
socket.Options.HeartbeatTimeout = TimeSpan.FromMilliseconds(10*1000);
socket.Options.Linger = TimeSpan.Zero; // do not block on time out
NetMQMessage msg = new NetMQMessage();
msg.Append(req.ToString(), Encoding.UTF8);
socket.SendFrame(msg.ToString());
msg.Clear();
}
Environment
Expected behaviour
I am sending a protocol buffer message from .Net client to Cpp server. Both are using ZeroMQ but with different APIs.
The message looks something like this
req.proto
this is the .Net client
this is the cpp server
should (obviously) spin and print
Actual behaviour
Steps to reproduce the behaviour
II. install cppzmq wrapper
git clone https://github.com/zeromq/cppzmq.git cd cppzmq mkdir build cd build cmake .. sudo make -j4 install
sudo apt-get install \ libprotobuf-dev \ protobuf-compiler