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

New Post: How to cleanup and stop a stream?

$
0
0
Hi,

To stop a stream just call Stream.StopStream().
If your project is quite new, I would advise using Tweetinvi 0.9 (download from the SourceCode -> Development).

Version 0.8.3.x
var stream = new Stream(...);
Action<ITweet> tweetReceived = t =>
{
       stream.StopStream();
};

stream.StartStream(token, tweetReceived);
Version 0.9
var stream = Stream.CreateFilteredStream();
stream.MatchingTweetReceived += (sender, args) =>
{
    stream.StopStream();
};
Please let me know if this help.
Linvi

Viewing all articles
Browse latest Browse all 4126

Trending Articles