Dear Pieter, Regarding your suggestion I have a question regarding Weather Update Server example (https://github.com/imatix/zguide/blob/master/examples/C/wuserver.c), said example uses dual binding tcp and ipc is it neceesary for PubSub style communication to have two bindings? And as per your suggestion will I have to replace the second binding with tcp binding as per following code snippet.
--- Original Code Snippet from Example void *context = zmq_ctx_new (); void *publisher = zmq_socket (context, ZMQ_PUB); int rc = zmq_bind (publisher, "tcp://*:5556"); assert (rc == 0); rc = zmq_bind (publisher, "inproc://workers"); assert (rc == 0); --- Revised code as per your suggestion (if i got it right) void *context = zmq_ctx_new (); void *publisher = zmq_socket (context, ZMQ_PUB); int rc = zmq_bind (publisher, "tcp://*:5556"); assert (rc == 0); rc = zmq_bind (publisher, "tcp://*.5557"); assert (rc == 0); ---------------------------------------- I have tried this on my side Server and Client run successfully, however no updates are collected by client, can you help me to resolve this issue so that I can run PubDub example on my side. On Mon, Jun 17, 2013 at 6:51 PM, Pieter Hintjens <[email protected]> wrote: > Shaukat, > > Sorry about this. I'd recommend changing the ipc:// endpoint to a > tcp:// one (with valid endpoints). It will work just the same. The > later examples all do this. > > -Pieter > > On Mon, Jun 17, 2013 at 3:10 PM, shancat <[email protected]> wrote: >> Not that I know of but I haven't gone that deep into zmq on Windows. You >> might be sacrificing performance but I don't think there's up to date >> performance information on Windows. Maybe you can do some benchmarks? If go >> to http://api.zeromq.org/3-2:zmq-bind and go to the part about transports >> you can go to each inbuilt transport doc page and read up. >> >> On Jun 17, 2013 10:44 PM, "Shaukat Mahmood Ahmad" <[email protected]> wrote: >> >> Thanks for being supportive, one last thing if I go with C/C++ on >> Windows what else will I have to sacrifice (other than ipc://)? Can >> you guide me to a reference / contents / list of zeroMQ protocols / >> transports with supported platforms. >> >> Regards, >> SMA >> >> On Mon, Jun 17, 2013 at 5:34 AM, shancat <[email protected]> wrote: >>> It depends what you're trying to do with it but yes I would use it on >>> Windows myself. You might want to look at the C# binding >>> (https://github.com/zeromq/clrzmq) or the native C# port >>> (https://github.com/zeromq/netmq). >>> >>> On Jun 17, 2013 4:37 AM, "Shaukat Mahmood Ahmad" <[email protected]> wrote: >>>> >>>> Thank shancat, yes finally I found it in API reference guide and in an >>>> old thread (under zmq mailing list) where some one had requested and >>>> tried to add ipc:// support for windows in 2011 but no success till >>>> 2013. As a user can you recommend zMQ on windows as I was evaluating >>>> it for a commercial software product currently running on Windows? >>>> >>>> >>>> On Sun, Jun 16, 2013 at 8:22 PM, shancat <[email protected]> wrote: >>>> > From the documentation: "The inter-process transport is currently only >>>> > implemented on operating systems that provide UNIX domain sockets." So >>>> > that's why bit doesn't work on Windows, failing with a helpful >>>> > "Protocol >>>> > not >>>> > supported" message. >>>> > >>>> > On Jun 16, 2013 10:30 PM, "Shaukat Mahmood Ahmad" <[email protected]> wrote: >>>> >> >>>> >> I am new to zeroMQ so sorry for incomplete information in my last >>>> >> message in this thread, after debugging I have found that following >>>> >> code is failing on Windows platform with error # 135 and message >>>> >> against this error is "Protocol not supported", there is some >>>> >> advancement but I am still confused to get exact reason of failure >>>> >> (as I am unable to locate some data in help / manual). >>>> >> >>>> >> Environment: >>>> >> Windows 7 Professional 64bit >>>> >> Visual Studio 2012 >>>> >> zeroMQ version 3.2.3 >>>> >> >>>> >> code snippet: >>>> >> >>>> >> rc = zmq_bind (publisher, "ipc://weather.ipc"); // returns rc = -1 >>>> >> err = zmq_errno(); // return err = 135 >>>> >> errmsg = (char*) zmq_strerror(err); = returns error message string >>>> >> as "Protocol not supported" >>>> >> >>>> >> Can anybody tell me about ipc protocol support on Windows platform. >>>> >> >>>> >> --------------------------------------------------------------------- >>>> >> End Note: >>>> >> Now I am really confused about statements made about zeroMQ such as >>>> >> it will provide ease will reduce time to solve bigger problems, but >>>> >> the way it is presented and documented is really useless, to use this >>>> >> library either you have extra time to debug the available source and >>>> >> re-write to fit your need or simply find some other suitable library. >>>> >> >>>> >> 0/100 for zeroMQ because I have wasted my whole weekend on trying to >>>> >> understand this useless library. >>>> >> >>>> >> >>>> >> >>>> >> On Sun, Jun 16, 2013 at 2:12 PM, Shaukat Mahmood Ahmad <[email protected]> >>>> >> wrote: >>>> >> > Hi, >>>> >> > I am unable to run Weather update server (wuserver.c) example due to >>>> >> > failed assertion at second bind request as following. >>>> >> > >>>> >> > rc = zmq_bind (publisher, "ipc://weather.ipc"); >>>> >> > assert (rc == 0); >>>> >> > >>>> >> > The above assert fails as zmq_bind() returns -1. >>>> >> > >>>> >> > Can anybody help me to resolve this error. >>>> >> > >>>> >> > >>>> >> > : Complete Code >>>> >> > >>>> >> > >>>> >> > #include "zhelpers.h" >>>> >> > >>>> >> > int main () >>>> >> > { >>>> >> > void *context = zmq_ctx_new(); >>>> >> > void *publisher = zmq_socket(context, ZMQ_PUB); >>>> >> > int rc = zmq_bind(publisher, "tcp://*:5556"); >>>> >> > assert (rc == 0); >>>> >> > rc = zmq_bind(publisher, "ipc://weather.ipc"); >>>> >> > rc = zmq_bind (publisher, "ipc://weather.ipc"); >>>> >> > assert (rc == 0); >>>> >> > >>>> >> > srand ((unsigned) time(NULL)); >>>> >> > >>>> >> > while (1) >>>> >> > { >>>> >> > int zipcode, temperature, relhumidity; >>>> >> > char update[20]; >>>> >> > zipcode = randof (100000); >>>> >> > temperature = randof (215) - 80; >>>> >> > relhumidity = randof (50) + 10; >>>> >> > sprintf (update, "%05d %d %d", zipcode, temperature, >>>> >> > relhumidity); >>>> >> > s_send( publisher, update); >>>> >> > } >>>> >> > zmq_close (publisher); >>>> >> > zmq_ctx_destroy (context); >>>> >> > return 0; >>>> >> > } >>>> >> _______________________________________________ >>>> >> zeromq-dev mailing list >>>> >> [email protected] >>>> >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>>> > >>>> > >>>> > _______________________________________________ >>>> > zeromq-dev mailing list >>>> > [email protected] >>>> > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>>> > >>>> _______________________________________________ >>>> zeromq-dev mailing list >>>> [email protected] >>>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >>> >>> _______________________________________________ >>> zeromq-dev mailing list >>> [email protected] >>> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >>> >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> >> >> _______________________________________________ >> zeromq-dev mailing list >> [email protected] >> http://lists.zeromq.org/mailman/listinfo/zeromq-dev >> > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev _______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
