Class: Sombrero::RTCPController
- Inherits:
-
BaseController
- Object
- RocketIO::Controller
- BaseController
- Sombrero::RTCPController
- Defined in:
- lib/sombrero/rtcp_controller.rb
Instance Attribute Summary collapse
-
#socket ⇒ Object
readonly
Returns the value of attribute socket.
Instance Method Summary collapse
Instance Attribute Details
#socket ⇒ Object (readonly)
Returns the value of attribute socket.
3 4 5 |
# File 'lib/sombrero/rtcp_controller.rb', line 3 def socket @socket end |
Instance Method Details
#get ⇒ Object
5 6 7 8 9 10 11 12 13 14 15 16 17 |
# File 'lib/sombrero/rtcp_controller.rb', line 5 def get return unless websocket? @router = RocketIO::Router.new(*RocketIO.controllers) @socket = Tubesock.hijack(env) @socket.onopen(&method(:on_open)) @socket.(&method(:on_message)) @socket.onclose(&method(:on_close)) @socket.listen halt websocket_response end |