예제 #1
0
파일: NotifyEvent.cs 프로젝트: xornand/bond
        private static void DoNotify(NotifyEventProxy<EpoxyConnection> proxy, int requestNum, string payload, UInt16 delay)
        {
            var request = new PingRequest { Payload = payload, DelayMilliseconds = delay };
            proxy.NotifyAsync(request);

            Console.WriteLine($"P Event #{requestNum} Delay: {delay}");
        }
예제 #2
0
        static void DoNotify(NotifyEventProxy <RelayEpoxyConnection> proxy, int requestNum, string payload, UInt16 delay)
        {
            var request = new PingRequest {
                Payload = payload, DelayMilliseconds = delay
            };

            proxy.NotifyAsync(request);

            Console.WriteLine($"P Event #{requestNum} Delay: {delay}");
        }
예제 #3
0
파일: NotifyEvent.cs 프로젝트: xornand/bond
        private static void MakeRequestsAndPrint(int numRequests)
        {
            var notifyEventProxy = new NotifyEventProxy<EpoxyConnection>(s_connection);

            var rnd = new Random();

            foreach (var requestNum in Enumerable.Range(0, numRequests))
            {
                UInt16 delay = (UInt16)rnd.Next(2000);
                DoNotify(notifyEventProxy, requestNum, "notify" + requestNum.ToString(), delay);
            }
        }
예제 #4
0
        static void MakeRequestsAndPrint(int numRequests)
        {
            var notifyEventProxy = new NotifyEventProxy <RelayEpoxyConnection>(s_connection);

            var rnd = new Random();

            foreach (var requestNum in Enumerable.Range(0, numRequests))
            {
                UInt16 delay = (UInt16)rnd.Next(2000);
                DoNotify(notifyEventProxy, requestNum, "notify" + requestNum, delay);
            }
        }