Module: SocketIo

Extended by:
SocketIo
Included in:
SocketIo
Defined in:
lib/socket.io.rb,
lib/socket.io/packet.rb,
lib/socket.io/version.rb,
lib/socket.io/websocket.rb,
lib/socket.io/websocket/sender.rb,
lib/socket.io/packet/ack_packet.rb,
lib/socket.io/packet/json_packet.rb,
lib/socket.io/packet/noop_packet.rb,
lib/socket.io/websocket/receiver.rb,
lib/socket.io/packet/error_packet.rb,
lib/socket.io/packet/event_packet.rb,
lib/socket.io/packet/connect_packet.rb,
lib/socket.io/packet/message_packet.rb,
lib/socket.io/websocket/carrier_wave.rb,
lib/socket.io/packet/heartbeat_packet.rb,
lib/socket.io/packet/disconnect_packet.rb

Defined Under Namespace

Modules: Websocket Classes: Packet

Constant Summary collapse

VERSION =
"0.0.2"

Instance Method Summary collapse

Instance Method Details

#routes(router, handler, path = '/socket.io') ⇒ Object



8
9
10
11
12
13
14
15
# File 'lib/socket.io.rb', line 8

def routes(router, handler, path = '/socket.io')
  router.add("#{path}/:protocol_version").to(HandshakeAction)
  router.add("#{path}/:protocol_version/websocket/:session_id").to(handler)
  #router.add("#{path}/:protocol_version/flashsocket/:session_id").to(ImpactAction)
  #router.add("#{path}/:protocol_version/xhr-polling/:session_id").to(ImpactXhrPollingAction)
  #router.add("#{path}/:protocol_version/xhr-polling/:session_id/:verified").to(ImpactXhrPollingAction)
  #router.add("#{path}/:protocol_version/xhr-polling/:session_id/send").to(ImpactXhrPollingAction)
end