Exemple #1
0
        public static void SetGameState()
        {
            var input   = new EntitiesRequest();
            var channel = GrpcChannel.ForAddress($"http://{_IP}:5000");
            var client  = new GlowkiServiceClient(channel);

            client.SetState(new State()
            {
                State_ = 1
            });
        }
Exemple #2
0
        static async Task <IEnumerable <GlowkiServer.Entity> > AsyncLoadEntities()
        {
            var input   = new EntitiesRequest();
            var channel = GrpcChannel.ForAddress($"http://{_IP}:5000");
            var client  = new GlowkiServiceClient(channel);
            var t       = client.GetEntities(input);

            List <GlowkiServer.Entity> l = new List <GlowkiServer.Entity>();

            await foreach (var e in t.ResponseStream.ReadAllAsync())
            {
                l.Add(e);
            }

            return(l);
        }