Exemplo n.º 1
0
        private async Task SubData()
        {
            _blinds = await DeepStreamConnector.Instance.Records.GetRecordAsync("Blinds");

            _chips = await DeepStreamConnector.Instance.Records.GetRecordAsync("Chips");

            _rules = await DeepStreamConnector.Instance.Records.GetRecordAsync("Rules");

            _tables = await DeepStreamConnector.Instance.Records.GetRecordAsync("Tables");

            _global = await DeepStreamConnector.Instance.Records.GetRecordAsync("Global");
        }
Exemplo n.º 2
0
        async static Task Exec()
        {
            Console.WriteLine("Connecting to " + Environment.GetEnvironmentVariable("AZSIM_ComHub_IP") + "...");
            string simulatorHostId = Guid.NewGuid().ToString();
            var    client          = new DeepStreamClient(Environment.GetEnvironmentVariable("AZSIM_ComHub_IP"), 6020);

            if (await client.LoginAsync())
            {
                Console.WriteLine("Connection to hub established");
                Console.WriteLine("Registered as simulator host " + simulatorHostId);
                await client.Rpcs.RegisterProviderAsync <string, string>(simulatorHostId, HandleCommand);

                record = await client.Records.GetRecordAsync(simulatorHostId);

                record["runtime"]         = "W10 Console";
                record["status"]          = "Ready";
                record["simulatorHostId"] = simulatorHostId;

                var list = await client.Records.GetListAsync("simulatorhosts");

                list.Add(simulatorHostId);
            }
        }