Module: Faye::WebSocket::Adapter
- Included in:
- RainbowsClient, Goliath::API, Thin::Request
- Defined in:
- lib/faye/websocket/adapter.rb
Instance Method Summary collapse
Instance Method Details
#async_connection? ⇒ Boolean
15 16 17 |
# File 'lib/faye/websocket/adapter.rb', line 15 def async_connection? websocket? or eventsource? end |
#eventsource? ⇒ Boolean
10 11 12 13 |
# File 'lib/faye/websocket/adapter.rb', line 10 def eventsource? e = defined?(@env) ? @env : env EventSource.eventsource?(e) end |
#websocket? ⇒ Boolean
5 6 7 8 |
# File 'lib/faye/websocket/adapter.rb', line 5 def websocket? e = defined?(@env) ? @env : env WebSocket.websocket?(e) end |