Source for .NET API

Issue #10 resolved
Christoph Weigert created an issue


can you publish the source code for this shiny software?

I would really like to use the API for my private webinterface / .NET API.

If you can't publish, can you point me into the right direction how to create my own API? I already tried slice2cs and got my murmur.cs file but I don't know how I can access / use the classes.

If would be enough if you provide an example how I can get the Servers running in the default ICE connection.

Would really appreciate your feedback.

Comments (6)

  1. Anton Demidov repo owner

    I thought about that. It's needed some tuning and documentation but now I busy on other projects.

    I can't promise but I hope I'll publish sources on GitHub when I'll return to the project. We have great plans to make it base for a new web project.

    The main problem for .NET Ice implementation is you must use the same version as a Murmur server you connect to. I've made MurmurAdapter.dll for that and MurmurXXX.dll for each Murmur version, and MurmurPlugin.dll as a wrapper on Ice connection and classes. It's easier use than direct Ice methods.

    If you need not need dynamic version switcher then you can add only MurmurPlugin.dll and MurmurXXX.dll into your project references. Don't forget place Ice.dll near your program executable.

    Usage example (replace address, port, secret):

    var instance = new Murmur.Instance();
    instance.Connect(address, port, secret);
    foreach (var s in instance.GetAllServers())
        if (s.Value.IsRunning())
            // print online
            Console.WriteLine("[{0}, {1}] {2} users online", s.Value.Id, s.Value.Port, s.Value.GetOnline());
            // print settings
            foreach (var c in s.Value.GetAllConf(true))
                Console.WriteLine("\t{0}: {1}", c.Key, c.Value);
  2. Christoph Weigert reporter

    Thanks for you fast response.

    Can't you release an unfinished project? I'd really like to contribute to this project.

    I know that it must use the same as my server version. I used the following command on linux to generate the Murmur.cs for my 1.2.8 instance:

    slice2cs -I/usr/share/Ice-3.4.2/slice/ --impl-tie

    I copied the file into my c# project but I can't find the Instance Method within the Murmur Namespace / File. Did I miss some command when I created the .cs file? What command parameters did you use?.

    See this gist for my Murmur.cs:

  3. Anton Demidov repo owner

    I'm talking about DLLs that are distributed with Yulli. For now I can't release unfinished project.

    If you use my code above you should not use Murmur.cs that is generated using slice2cs.

  4. Anton Demidov repo owner

    For instance, If you reference Murmur128.dll then you should replace Murmur namespace to Murmur128 in my code example.

  5. Log in to comment