[zeromq-dev] send msq from pyzmq to a server that "wait's" with zsock_brecv()
Luca Boccassi
luca.boccassi at gmail.com
Sat Dec 29 21:13:02 CET 2018
zsock_[b][recv|send] are designed and documented to be used just by
themselves. While it is possible (and simple) to reverse-engineer the
protocol (just look at the code in czmq/src/zsock.c), and it's also
very unlikely to ever change in an incompatible way at the network
level, we make no guarantees of this.
CZMQ has ffi python bindings that you can use as an alternative.
On Sat, 29 Dec 2018 at 18:00, Juergen Gnoss <jgnoss at hotmail.com> wrote:
>
> I use the draft API from git master czmq
>
> Server and several clients, all written in c work very well.
>
> I use
> zsock_new_server(sm_cmd_sock_ep);
> and
> zsock_new_client(sm_cmd_sock_ep);
>
> then clients and server do :
>
> zsock_bsend(self->cmdSock, "s112", "R_INIT", 2, (r1 < 0)?1:0, r2);
>
> res = zsock_brecv (self->cmdSock, "s112", &cmd, &deviceNo, &sign, &value);
>
> to get messages back and forth
>
>
> I'm by no means a python guy, and I'm struggling to send a msg
> from pyzmq to that server
>
> Is that possible?
> And if it's possible, how do I have to encode the message on the Python side?
>
> any hint's or links where I can lookup that stuff?
>
> PS:
> pyzmq is installed with
>
> pip install -v --pre pyzmq --install-option=--enable-drafts
>
> So, draft stuff should be included
>
> thanks
> Ju
>
>
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> https://lists.zeromq.org/mailman/listinfo/zeromq-dev
More information about the zeromq-dev
mailing list