[zeromq-dev] Unable to run Weather update server (wuserver.c) example
shancat
shannenlaptop at gmail.com
Sun Jun 16 17:22:34 CEST 2013
>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" <write at sma.im> 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 <write at sma.im>
> 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
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20130617/e77e946b/attachment.htm>
More information about the zeromq-dev
mailing list