[zeromq-dev] C# interface for Zmq 2.x

Martin Sustrik sustrik at 250bpm.com
Wed Mar 17 11:41:50 CET 2010


Hi Alex,

> Of coz I would like to tried it. 
> But I know nth about c++ so tried to use SWIG to generate the C#
> interface last night and failed last night.
> 
> Could you send me the binding for 1.0 so that I can port it to 2.0?

Here's the code for C# binding in 0MQ/1.0:

http://github.com/sustrik/zeromq1/blob/master/libclrzmq/zmq.cs

As you can see it's pretty trivial code that does nothing but forward 
each call to underlying C library.

Here's the new 2.0 interface:

http://github.com/sustrik/zeromq2/blob/master/include/zmq.h

What has to be done:

1. Constants in zmq.h should be made avaiable in zmq.cs
2. Functions from zmq.h should be declared as static extenal functions 
in zmq.cs
3. Simple C# wrapper should be written to provide a nice OO interface.

Basically all the code can be found in the old binding, however, if you 
run into problems, feel free to discuss it on the list.

Martin



More information about the zeromq-dev mailing list