private void ProcessTrackerResponse() { // The tracker response is a Dictionary if (trackerResponse != null) { // Create the dictionary try { Console.WriteLine(Conversions.ConvertByteArrayToString(trackerResponse)); response = new Dictionary(trackerResponse); // Is there a failure reason ?? if (response.ContainsKey("failure reason")) { trackerFailure = true; trackerFailureReason = response["failure reason"].ToString(); } else { // We have data from the Tracker // Get the interval requestInterval = ((BeEncode.Integer)response["interval"]).IntegerValue; } } catch (DictionaryException de) { /// TODO (log error) ; } catch (IntegerException ie) { /// TODO (log error) ; } // We have a new Tracker response, notify!!! if (onNewTrackerResponse != null) onNewTrackerResponse(); } // Progam the timer to future requests even if not yet completed. Only once //if (timer == null) // timer = new Timer(new TimerCallback(TimeToNewRequest), null, requestInterval, requestInterval); }