Class: HandshakeAction
- Inherits:
-
Cramp::Action
- Object
- Cramp::Action
- HandshakeAction
- Defined in:
- lib/socket.io/actions/handshake_action.rb
Constant Summary collapse
- HEARTBEAT_TIMEOUT =
27
- CLOSING_CONNECTION_TIMEOUT =
10
- TRANSPORTS =
TRANSPORTS = ‘websocket,xhr-polling,flashsocket’
'websocket'
Instance Method Summary collapse
Instance Method Details
#session_id ⇒ Object
14 15 16 |
# File 'lib/socket.io/actions/handshake_action.rb', line 14 def session_id uuid.generate end |
#start ⇒ Object
18 19 20 21 22 |
# File 'lib/socket.io/actions/handshake_action.rb', line 18 def start body = [session_id, HEARTBEAT_TIMEOUT, CLOSING_CONNECTION_TIMEOUT, TRANSPORTS].join(':') render body finish end |
#uuid ⇒ Object
10 11 12 |
# File 'lib/socket.io/actions/handshake_action.rb', line 10 def uuid @uuid ||= UUID.new end |