Beispiel #1
0
        private void SetRefreshRate( RefreshRate msg )
        {
            if (Driver != null)
            {
                if (msg.Rate > 0)
                {
                   // _logger.InfoFormat("Changing polling frequence to every {0} seconds", msg.Rate);
                    Driver.SetRefresh(msg.Rate);
                }
                else if (msg.Rate == 0)
                {
                    //_logger.Info("Received end of stream message, exiting.");

                    //  Terminate the socket driver so it stops trying.
                    Driver.Terminate();

                    //  Tell anyone listening that's the end of the session.
                    DispatchMessage( new EndOfSession(), true );
                }
            }
        }
        private void TestUnknown2(Header h)
        {
            RefreshRate msg = new RefreshRate();

            msg.Deserialise(h, msg.CreatePacketType(h, Input, Input));
        }