Quantcast
Channel: Tweetinvi a friendly Twitter C# library
Viewing all articles
Browse latest Browse all 4126

New Post: Simple stream not stopping when asked

$
0
0
Hi there,

What is the correct way to stop the stream?
Normally you should always be able to stop a stream using Stream.StopStream().
SimpleStream stream = new SimpleStream("https://stream.twitter.com/1.1/statuses/sample.json");
stream.StartStream(token, tweet =>
{
          stream.StopStream();
});
This should stop the stream when you receive your first tweet.

Also, i used the StreamStopped event to shed some light on the matter, it returned null as a value.
The StreamStopped event returns the exception that occured to make the stream stop. Receiving null implies that the stream stopped normally, for example by invoking Stream.StopStream().

Please let me know if this help.
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>