[zeromq-dev] P/Invoke-based CLR access to zeroMQ

dok at dok-net.net dok at dok-net.net
Thu Feb 19 16:02:07 CET 2009


Hi Barak!

Many thanks to you for replying so quickly.

I have built your c# file successfully, and I could also create and bind queues and exchanges. As for sending and receiving, I had to tweak the marshalling of the free function a bit, at least on Mono, it wouldn't work otherwise. And I had to add some Finalize/Dispose logic.

I would like two additional changes, but these first require a modification to the c-language API of 0MQ:

- expose the api_thread_t::mask function (and requisite message_data; message_gap constants)
- align czmq_receive to return the queue id the same as the C++ API does (and provide the block argument)

How to tell apart message_gap from non-blocking receive is TBD, I image that a return of zero means no data in non-blocking mode, and returning a null pointer for the data indicates a gap in a given queue.

Please find attached my version of dnzmq.cs, please commit it to the zeromq sources under the GPL or LGPL as deemed appropriate, pending Barak's agreement to do the same with his original work.

Regards,
Dirk

-------------- next part --------------
A non-text attachment was scrubbed...
Name: dnzmq.cs
Type: text/x-csharp
Size: 4502 bytes
Desc: not available
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20090219/cd2c6204/attachment.bin>


More information about the zeromq-dev mailing list