Esempio n. 1
0
        private NetMQTimer CreateInitTimer()
        {
            var guid        = CorrelationFactory.GetNextCorrelation();
            var rnd         = new Random(guid.GetHashCode());
            var randomStart = TimeSpan.FromMilliseconds(rnd.Next(500, 1000)); // Prevent self similar behaviour
            var result      = new NetMQTimer(randomStart);

            result.Elapsed += (sender, args) =>
            {
                args.Timer.Enable = false; // one shot only
            };

            return(result);
        }
Esempio n. 2
0
        // To be made private

        // temporary
        public JoinNetwork EmitJoinNetwork()
        {
            return(new JoinNetwork(Identity, CorrelationFactory.GetNextCorrelation()));
        }