[Lazarus] ZeroMQ Bindings

Leonardo M. Ramé l.rame at griensu.com
Tue Aug 23 15:27:49 CEST 2016



El 23/08/16 a las 09:57, Sandro Cumerlato escribió:
> I never played with ZeroMQ before, can you please provide the
> corresponding server side piece of source code?
>
> Sandro Cumerlato
>
>
> On 23 August 2016 at 14:48, Leonardo M. Ramé <l.rame at griensu.com> wrote:
> ...
>>>
>>> This time it compiles, but hands on the zmq_recv.
>>>
>>
>> Sorry "hands" -> "hangs".
>>

Well, this is the server that's waiting (zmq_recv) for messages.

The client is this (written in "C"):

   void *context = zmq_ctx_new();
   void *requester = zmq_socket(context, ZMQ_REQ);
   int conn = zmq_connect(requester, "ipc://localscp");
   zmq_send(requester, "hello world", 11, 0);
   zmq_close(requester);
   zmq_ctx_destroy(context);



-- 
Leonardo M. Ramé
Medical IT - Griensu S.A.
Av. Colón 636 - Piso 8 Of. A
X5000EPT -- Córdoba
Tel.: +54(351)4246924 +54(351)4247788 +54(351)4247979 int. 19
Cel.: +54 9 (011) 40871877


More information about the Lazarus mailing list