public bool CancelRequest() { if (CurrentAsk == null) { return(false); } CurrentAsk.stopListening(); CurrentAsk = null; RaisePropertyChanged("CurrentAsk"); //Send request to remove from queue here! Payload p = new Payload(); p.request = "cancel"; p.sessionkey = client.SessionKey; p.sessionid = client.SessionID; p.path = path.Concat(new String[] { "audio" }).ToList(); Random rnd = new Random(); p.identity = rnd.Next(Int32.MaxValue); ResponsePayload r = new ResponsePayload(); r.message = "Connection: timeout!"; connector.Send(p); return(true); }
public PingRequest addPing(String tags) { String[] tagsArr; if (tags.Contains(";")) { tagsArr = tags.Split(';'); } else { tagsArr = new String[] { tags }; } CurrentAsk = new PingRequest(this, tagsArr); RaisePropertyChanged("CurrentAsk"); return(CurrentAsk); }
public PingRequest addPing(IList <String> tags) { CurrentAsk = new PingRequest(this, tags.ToArray()); RaisePropertyChanged("CurrentAsk"); return(CurrentAsk); }
public PingRequest addPing(IList<String> tags) { CurrentAsk = new PingRequest(this, tags.ToArray()); RaisePropertyChanged("CurrentAsk"); return CurrentAsk; }
public PingRequest addPing(String tags) { String[] tagsArr; if (tags.Contains(";")) { tagsArr = tags.Split(';'); } else { tagsArr = new String[] { tags }; } CurrentAsk = new PingRequest(this, tagsArr); RaisePropertyChanged("CurrentAsk"); return CurrentAsk; }