public void RegisterStarsListener(ulong timestamp) { var starsPollClient = new ExtendedWebClient(); starsPollClient.DownloadDataCompleted += starsPollHandler; starsPollClient.Headers.Add(HttpRequestHeader.Cookie, token.ToString()); starsPollClient.DownloadDataAsync(new Uri(url + longpollStars + "&since_time=" + timestamp)); }
public void RegisterNetListener() { if (listenNet) { var starsPollClient = new ExtendedWebClient(); starsPollClient.DownloadDataCompleted += netPollHandler; starsPollClient.Headers.Add(HttpRequestHeader.Cookie, token.ToString()); starsPollClient.DownloadDataAsync(new Uri(url + longpollNet)); } }