This exists in clrzmq as well, here's the gist of it: Context ctx; Socket socketForCtx; PollItems[] pollItems;
pollItems[0] = socketForCtx.CreatePollItem(IOMultiPlex.POLLIN | IOMultiPlex.POLLOUT); pollItems[0].PollInHandler += (s, r) => Console.WriteLine("In!"); pollItems[0].PollInHandler += (s, r) => Console.WriteLine("Out!"); while(1) { ctx.Poll(pollItems, 250/*ms*/); } On Sat, Nov 5, 2011 at 12:29 PM, Ian Barber <ian.bar...@gmail.com> wrote: > On Sat, Nov 5, 2011 at 11:17 AM, lanre lawal <lawillas4e...@yahoo.com> wrote: > So I was wondering is there a way not to set the NOBLOCK >> option and then set a timeout (milliseconds) for the request so that it >> sticks around for data just for a specified period of time. That way I don't >> need to set the NOBLOCK option and I can be guaranteed that the server would >> be freed up after a particular amount of seconds. > > Yep, take a look at zmq_poll - no idea what that is in the CLR > bindings, but they'll let you wait for a message for a certain > timeout. Might be worth a look at the guide as well for a good > introduction: http://zguide.zeromq.org/page:all > > Ian > _______________________________________________ > zeromq-dev mailing list > zeromq-dev@lists.zeromq.org > http://lists.zeromq.org/mailman/listinfo/zeromq-dev > _______________________________________________ zeromq-dev mailing list zeromq-dev@lists.zeromq.org http://lists.zeromq.org/mailman/listinfo/zeromq-dev