[zeromq-dev] Limit socket queue size
Johnny Gozde
johnny at jgoz.net
Mon Mar 19 16:53:22 CET 2012
Boris,
On Mon, Mar 19, 2012 at 9:48 AM, Boris Gulay <boris at boressoft.ru> wrote:
> 19.03.2012 19:40, Boris Gulay пишет:
> > I want to limit socket internal queue to one message. To do that I call
> > zmq_setsockopt with second argument set to one right after socket
> > creation (socket type = PUSH).
> > I use zlrzmq and I get an exception: Invalid argument. What I'm doing
> wrong?
>
I'm guessing you meant "clrzmq" :)
> I should call method this way:
>
> zmqSocket.SetSockOpt(ZMQ.SocketOpt.HWM, (long)1);
>
Socket options are exposed as properties on the Socket type. Please try
setting the zmqSocket.HWM property directly. e.g.,
zmqSocket.HWM = 1;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20120319/d52868ce/attachment.htm>
More information about the zeromq-dev
mailing list