Re: [zeromq-dev] Samples of ZMTP?

2014-08-11 Thread Stéphane Wirtel
Here is the reference: http://rfc.zeromq.org/spec:37

On 11 Aug 2014, at 22:01, Stéphane Wirtel wrote:

> Hi all,
>
> Based on the ABNF grammar, I am looking for samples of ZMTP.
>
> Do you have some examples because I would like to test my implementation
> of the parser.
>
> Regards,
>
--
Stéphane Wirtel - http://wirtel.be - @matrixise
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


[zeromq-dev] Samples of ZMTP?

2014-08-11 Thread Stéphane Wirtel
Hi all,

Based on the ABNF grammar, I am looking for samples of ZMTP.

Do you have some examples because I would like to test my implementation 
of the parser.

Regards,

Stephane
--
Stéphane Wirtel - http://wirtel.be - @matrixise
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev


Re: [zeromq-dev] PUSH Socket is queued?

2014-02-26 Thread Stéphane Wirtel
ok, but I thought that you could push your message on an internal small 
queue and just dispatch them once you have a pull socket.

is there a pattern for that?

On 26 Feb 2014, at 18:01, Doron Somech wrote:

> If you don't have any pull socket connected you can get eagain...
> On Feb 26, 2014 5:45 PM, "Stéphane Wirtel"  
> wrote:
>
>> With get_hwm() on the socket, the value is 1000.
>>
>>
>> On 26 Feb 2014, at 17:29, Stéphane Wirtel wrote:
>>
>>> Hi all,
>>>
>>> I wanted to know if there is a queue for the message of a PUSH 
>>> socket,
>>> because my send is blocking or in error with the EAGAIN error.
>>>
>>> Here is the example:
>>>
>>> #!/usr/bin/env python
>>>
>>> import zmq
>>>
>>> context = zmq.Context()
>>>
>>> sender = context.socket(zmq.PUSH)
>>> sender.bind('tcp://*:5557')
>>>
>>> for task in range(100):
>>> print task
>>> sender.send_string(u'%d' % task, zmq.DONTWAIT)
>>>
>>> sender.close()
>>> context.terminate()
>>>
>>>> (zmq) python push.py
>>> 0
>>> Traceback (most recent call last):
>>> File "push.py", line 12, in 
>>> sender.send_string(u'%d' % task, zmq.DONTWAIT)
>>> File
>>>
>> "/Users/stephane/.virtualenvs/zmq/lib/python2.7/site-packages/zmq/sugar/socket.py",
>>> line 290, in send_string
>>> return self.send(u.encode(encoding), flags=flags, copy=copy)
>>> File "socket.pyx", line 565, in 
>>> zmq.backend.cython.socket.Socket.send
>>> (zmq/backend/cython/socket.c:5104)
>>> File "socket.pyx", line 620, in 
>>> zmq.backend.cython.socket.Socket.send
>>> (zmq/backend/cython/socket.c:4972)
>>> File "socket.pyx", line 156, in 
>>> zmq.backend.cython.socket._send_frame
>>> (zmq/backend/cython/socket.c:1842)
>>> File "checkrc.pxd", line 15, in zmq.backend.cython.checkrc._check_rc
>>> (zmq/backend/cython/socket.c:5784)
>>> zmq.error.Again: Resource temporarily unavailable
>>>
>>> Do you have an idea?
>>>
>>> Thanks
>>>
>>> Regards,
>>>
>>> Stephane
>>> ___
>>> 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
>>
> ___
> 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


Re: [zeromq-dev] PUSH Socket is queued?

2014-02-26 Thread Stéphane Wirtel
With get_hwm() on the socket, the value is 1000.


On 26 Feb 2014, at 17:29, Stéphane Wirtel wrote:

> Hi all,
>
> I wanted to know if there is a queue for the message of a PUSH socket,
> because my send is blocking or in error with the EAGAIN error.
>
> Here is the example:
>
> #!/usr/bin/env python
>
> import zmq
>
> context = zmq.Context()
>
> sender = context.socket(zmq.PUSH)
> sender.bind('tcp://*:5557')
>
> for task in range(100):
>   print task
>   sender.send_string(u'%d' % task, zmq.DONTWAIT)
>
> sender.close()
> context.terminate()
>
>> (zmq) python push.py
> 0
> Traceback (most recent call last):
> File "push.py", line 12, in 
>   sender.send_string(u'%d' % task, zmq.DONTWAIT)
> File
> "/Users/stephane/.virtualenvs/zmq/lib/python2.7/site-packages/zmq/sugar/socket.py",
> line 290, in send_string
>   return self.send(u.encode(encoding), flags=flags, copy=copy)
> File "socket.pyx", line 565, in zmq.backend.cython.socket.Socket.send
> (zmq/backend/cython/socket.c:5104)
> File "socket.pyx", line 620, in zmq.backend.cython.socket.Socket.send
> (zmq/backend/cython/socket.c:4972)
> File "socket.pyx", line 156, in zmq.backend.cython.socket._send_frame
> (zmq/backend/cython/socket.c:1842)
> File "checkrc.pxd", line 15, in zmq.backend.cython.checkrc._check_rc
> (zmq/backend/cython/socket.c:5784)
> zmq.error.Again: Resource temporarily unavailable
>
> Do you have an idea?
>
> Thanks
>
> Regards,
>
> Stephane
> ___
> 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


[zeromq-dev] PUSH Socket is queued?

2014-02-26 Thread Stéphane Wirtel
Hi all,

I wanted to know if there is a queue for the message of a PUSH socket, 
because my send is blocking or in error with the EAGAIN error.

Here is the example:

#!/usr/bin/env python

import zmq

context = zmq.Context()

sender = context.socket(zmq.PUSH)
sender.bind('tcp://*:5557')

for task in range(100):
 print task
 sender.send_string(u'%d' % task, zmq.DONTWAIT)

sender.close()
context.terminate()

> (zmq) python push.py
0
Traceback (most recent call last):
   File "push.py", line 12, in 
 sender.send_string(u'%d' % task, zmq.DONTWAIT)
   File 
"/Users/stephane/.virtualenvs/zmq/lib/python2.7/site-packages/zmq/sugar/socket.py",
 
line 290, in send_string
 return self.send(u.encode(encoding), flags=flags, copy=copy)
   File "socket.pyx", line 565, in zmq.backend.cython.socket.Socket.send 
(zmq/backend/cython/socket.c:5104)
   File "socket.pyx", line 620, in zmq.backend.cython.socket.Socket.send 
(zmq/backend/cython/socket.c:4972)
   File "socket.pyx", line 156, in zmq.backend.cython.socket._send_frame 
(zmq/backend/cython/socket.c:1842)
   File "checkrc.pxd", line 15, in zmq.backend.cython.checkrc._check_rc 
(zmq/backend/cython/socket.c:5784)
zmq.error.Again: Resource temporarily unavailable

Do you have an idea?

Thanks

Regards,

Stephane
___
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev