emitter-io / csharp

Client library for emitter.io compatible with .Net, .Net MicroFramework and WinRT
http://emitter.io
Eclipse Public License 1.0
29 stars 21 forks source link

GenerateKey issue #5

Closed davidatorres closed 6 years ago

davidatorres commented 6 years ago

I'm trying to generate a key using...

                emitter.GenerateKey(
                    secretKey,
                    channelName,
                    EmitterKeyType.ReadWrite,
                    keygen =>
                    {
                        channelKey = keygen.Key;
                        Console.WriteLine("Generated Key: " + keygen.Key);
                    });

And these lines are never executed to return a new key.

                        channelKey = keygen.Key;
                        Console.WriteLine("Generated Key: " + keygen.Key);

I can create a channel key in the emitter.io console and the code works fine... but I need to be able to generate channels on the fly.

Program.cs.txt

Florimond commented 6 years ago

I'm afraid the documentation is not very clear on that topic, but you channel name is required to end with "/". I'm pretty sure that's the issue here. Don't forget you can also use wildcards. Have a look at the documentation at the bottom of this page for more information https://emitter.io/develop/message-filtering/

davidatorres commented 6 years ago

That was the issue, my apologies for the false alarm, thought for sure I had covered that issue.