Beispiel #1
0
        public void Push(ControlDevice controlDevice)
        {
            if (uri == null)
            {
                Console.WriteLine("No URI");
            }
            else
            {
                RazerControlDevice razerControlDevice = controlDevice as RazerControlDevice;

                RESTHelpers.Put(razerControlDevice.UpdateUrl, razerControlDevice.GetUpdateModel());
            }
        }
Beispiel #2
0
        private void heartbeat_Tick(object sender, EventArgs e)
        {
            if (string.IsNullOrWhiteSpace(uri))
            {
                return;
            }

            string heartbeatUri = uri + "/heartbeat";

            try
            {
                RESTHelpers.Put(heartbeatUri);
            }
            catch (Exception ex)
            {
                Debug.WriteLine("heartbeat failed: " + ex.Message);
            }
        }