public void Cancel() { if (_clientSend != null) { _clientSend.CancelAsync(); _clientSend = null; } }
/// <summary> /// 取消下载 /// </summary> public virtual void Cancel() { if (_timer != null) { _timer.Change(Timeout.Infinite, Timeout.Infinite); } if (_webClient != null) { _webClient.DownloadStringCompleted -= new DownloadStringCompletedEventHandler(_webClient_DownloadStringCompleted); _webClient.CancelAsync(); _webClient = null; } }
public override void Clear() { mSendList.Clear(); mRecvList.Clear(); mWebClient.CancelAsync(); }
void Reset() { //StopMedia(); _jump_webclient.CancelAsync(); _jump_webclient = new HttpWebClient(); }