[Lazarus] ZeroMQ Bindings

Sandro Cumerlato sandro.cumerlato at gmail.com
Tue Aug 23 12:31:11 CEST 2016


Hello Leonardo,
please test attached "client.pas" source code.


Sandro Cumerlato


On 23 August 2016 at 02:56, Leonardo M. Ramé <l.rame at griensu.com> wrote:
...
> The port to FPC/Lazarus should be this:
>
>     var
>       context: pointer;
>       responder: pointer;
>       buf: array[0..9] of char;
>     begin
>       context := zmq_ctx_new;
>       responder := zmq_socket(context, ZMQ_REP);
>       zmq_bind(responder, 'ipc:///localscp');

too many "/"   here


>
>       while true do
>       begin
>         zmq_recv(responder, buf, 10, 0); // here hangs

you have to pass a pointer to buf[0] I guess


>         writeln(buf);
>       end;
>     end;
>
> Any hint?
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: client.pas
Type: application/octet-stream
Size: 389 bytes
Desc: not available
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20160823/4fca5b74/attachment.obj>


More information about the Lazarus mailing list