[zeromq-dev] Noob question - pyzmq & ZMQ_STREAM sockets
Goswin von Brederlow
goswin-v-b at web.de
Thu Feb 20 09:29:06 CET 2014
On Wed, Feb 19, 2014 at 09:50:57AM +0000, Virgil Palanciuc wrote:
> Hi all,
>
> I¹m trying to re-create the ³HTTP server² example using PYZMQ.
> My zmq version(s) are:
> Current libzmq version is 4.0.3
> Current pyzmq version is 14.0.1
>
> My first attempt is listed at the end of email. It kinda¹ works, but I
> have two questions:
>
>
> 1. For each connection, it prints a message, "Exception
> zmq.error.ZMQError: ZMQError('Bad address') in
> <zmq.backend.cython.message.Frame object at 0x10fbc35f0> ignored². Is
> there something I did wrong, or is this something that is fixed in a more
> recent version of libzmq/pyzmq?
I didn't get that and I should have the same versions.
> 2. How can one handle ³keep-alive² HTTP connections? If I don¹t send the
> empty message, no response is sent back; but if I send it, the connection
> is immediately closed.
With ZMQ_STREAM all data must be send with SNDMORE and in pairs of id
+ data. So socket.send_multipart isn't allowed.
MfG
Goswin
More information about the zeromq-dev
mailing list