Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            CoapServer server = new CoapServer();

            KeySet allKeys = LoadKeys(null);

            KeySet signingKeys = allKeys.Where(IsSigner);
            KeySet publicKeys  = allKeys.Where(IsEdhocPublic);
            OneKey signKey     = null;

            foreach (OneKey key in signingKeys)
            {
                signKey = key;
                break;
            }

            server.Add(new EdhocResource(publicKeys, signKey));

            server.Start();

            Console.WriteLine("Press key to exit");
            Console.ReadKey();
        }