[zeromq-dev] 0MQ for C#

Johnny Gozde johnny at jgoz.net
Fri Nov 30 18:20:38 CET 2012


Hi,

On Fri, Nov 30, 2012 at 1:53 AM, Marten Feldtmann <itlists at schrievkrom.de>wrote:

> The authors of 0MQ suggest to use only the 3.2 version and then you get
> a new wrapper - suitable for .NET 4.0 (or Mono 2.8 and up).
>

> If you have to use .NET 3.5 (or Mono 2.6), then you must use the
> different wrapper for 0MQ 2.2 (which results in a different source code
> for your application).
>

Mono 2.6 has some support for C# 4, but you have to configure it
with --with-profile4=yes (see
http://www.mono-project.com/Release_Notes_Mono_2.6).

Note that I haven't tested clrzmq compatibility with Mono 2.6 configured in
this way.


> One case of using this older wrapper is when one is using Unity3D
> together with 0MQ - Unity3D (3.x or 4.x) only supports Mono 2.6.
>
> In our case we now have to write two different wrappers around the basic
> wrapper to have the same API to our applications.
>

That's an unfortunate result of competing dependencies. I don't know much
about Unity, but initial searches seem to indicate that they use a custom
build of Mono, which certainly doesn't help in this situation.

clrzmq 3.0 takes advantage of some excellent .NET 4.0 features (like
SpinWait), but it might be possible to swap these out for .NET 3.5
compatibility. If it was done well, I'd accept this as a pull request
because a) this has been requested several times and b) I don't have the
time to implement it myself.


> By the way: what I found pretty difficult when coming from the C API
> level: The handling of exception in the .NET wrapper.
>

Can you clarify this please? Was there something about the way exceptions
were done in the .NET wrapper, or is it error codes vs. exceptions in
general?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20121130/0360fe42/attachment.htm>


More information about the zeromq-dev mailing list