Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Steve Wills
twitter-stream
Commits
b8508063
Commit
b8508063
authored
May 11, 2012
by
Laust Rud Jacobsen
Browse files
Adding a bit of documentation for the .on_no_data callback
parent
6650484a
Changes
2
Hide whitespace changes
Inline
Side-by-side
README.markdown
View file @
b8508063
...
...
@@ -32,6 +32,11 @@ JSON format only.
stream.on_max_reconnects do |timeout, retries|
# Something is wrong on your side. Send yourself an email.
end
stream.on_no_data do
# Twitter has stopped sending any data on the currently active
# connection, reconnecting is probably in order
end
}
...
...
lib/twitter/json_stream.rb
View file @
b8508063
...
...
@@ -90,6 +90,8 @@ module Twitter
@reconnect_callback
=
block
end
# Called when no data has been received for NO_DATA_TIMEOUT seconds.
# Reconnecting is probably in order as per the Twitter recommendations
def
on_no_data
&
block
@no_data_callback
=
block
end
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment