Class | EventMachine::Twitter::Connection |
In: |
lib/em-twitter/connection.rb
|
Parent: | EM::Connection |
MAX_LINE_LENGTH | = | 1024*1024 unless defined?(MAX_LINE_LENGTH) |
STALL_TIMEOUT | = | 90 unless defined?(STALL_TIMEOUT) |
STALL_TIMER | = | 10 unless defined?(STALL_TIMER) |
client | [R] | |
headers | [R] | |
host | [R] | |
options | [R] | |
port | [R] | |
reconnector | [RW] |
Returns the current state of the gracefully_closed flag gracefully_closed is set to true when the connection is explicitly stopped using the stop method
Returns the current state of the immediate_reconnect flag immediate_reconnect is true when the immediate_reconnect method is invoked on the connection
Returns a status of the connection, if no response was ever received from the server, then we assume a network failure.
A utility method used to invoke callback methods against the Client
Performs the reconnection after x seconds have passed. Reconnection is performed immediately if the argument passed is zero.
Otherwise it will create an EM::Timer that will reconnect
Resets the internals of the connection on initial connection and on reconnections. Clears the response buffer and resets internal state
Handles reconnection to the server when a disconnect occurs. By using a reconnector, it will gradually increase the time between reconnects per Twitter‘s reconnection guidelines.