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

Returns:

  • (Boolean)


15
16
17
# File 'lib/faye/websocket/adapter.rb', line 15

def async_connection?
  websocket? or eventsource?
end

#eventsource?Boolean

Returns:

  • (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

Returns:

  • (Boolean)


5
6
7
8
# File 'lib/faye/websocket/adapter.rb', line 5

def websocket?
  e = defined?(@env) ? @env : env
  WebSocket.websocket?(e)
end