Thanks Bent
On Wed, Jun 10, 2015 at 1:04 PM, Bent Cardan <bent@xxxxxxxxxxxxxxxxxxxx>
wrote:
Hi Terry, Your mix isn't right. Use NN_PULL with NN_PUSH. NN_SUB goes with
NN_PUB. -Bent
On Tue, Jun 9, 2015 at 8:50 PM, Terry (Gmail) <tcorlet@xxxxxxxxx> wrote:
Hi All
I'm relatively new and have just started experimenting with nanomsg (I
have used ZeroMQ before).
I'm considering a device for routing server messages to a set of
subscribing clients...something like:
int publisher = nn_socket(AF_SP_RAW, NN_PUB);
nn_bind(publisher, "tcp://publisher_address");
int listener = nn_socket(AF_SP_RAW, NN_PULL);
nn_connect(listener, "tcp://server_address");
nn_device(listener, publisher);
I was hoping that this sort of routing would be able to implement a zero
copy mechanism for message distribution to subscribers. But it doesn't
work, so I am obviously doing something wrong or it's not possible to mix
NN_PUB with NN_PULL. Any suggestions/advice?
Thanks,
Terry