Esempio n. 1
0
        public void Start(int port, GcmNotificationReceivedDelegate notificationReceived)
        {
            this.notificationReceived = notificationReceived;

            listener = new HttpListener();
            listener.Prefixes.Add("http://localhost:" + port + "/");


            Task.Factory.StartNew(ListenerWorker).ContinueWith(t =>
            {
                var ex = t.Exception;
                Console.WriteLine("GcmTestServer Failed: " + ex);
            }, TaskContinuationOptions.OnlyOnFaulted);
        }
Esempio n. 2
0
		public void Start(int port, GcmNotificationReceivedDelegate notificationReceived)
		{
			this.notificationReceived = notificationReceived;

			listener = new HttpListener();
			listener.Prefixes.Add("http://localhost:" + port + "/");
			

			Task.Factory.StartNew(ListenerWorker).ContinueWith(t =>
				{
					var ex = t.Exception;
					Console.WriteLine("GcmTestServer Failed: " + ex);
				}, TaskContinuationOptions.OnlyOnFaulted);
		}