Class: DDP::Server::WebSocket
- Inherits:
-
Celluloid::WebSocket
- Object
- Celluloid::WebSocket
- DDP::Server::WebSocket
- Includes:
- Protocol
- Defined in:
- lib/ddp/server.rb
Overview
Server on top of a Celluloid::WebSocket
Constant Summary
Constants included from Protocol
Constants included from Protocol::RPC
Instance Attribute Summary collapse
-
#api ⇒ Object
Returns the value of attribute api.
-
#subscriptions ⇒ Object
Returns the value of attribute subscriptions.
Attributes included from Protocol
Instance Method Summary collapse
-
#initialize(api_class, *args) ⇒ WebSocket
constructor
A new instance of WebSocket.
- #on_open ⇒ Object
- #read_message ⇒ Object
- #write_message(message) ⇒ Object
Methods included from Protocol
#handle_connect, #handle_established, #handle_session, #new_session_id
Methods included from Protocol::RPC
#handle_method, #handle_rpc, #send_error_result, #send_result, #send_updated
Methods included from Protocol::Data
#handle_data, #handle_sub, #handle_unsub, #send_added, #send_added_before, #send_changed, #send_moved_before, #send_nosub, #send_ready, #send_removed, #subscription_update
Methods included from Protocol::Heartbeat
Constructor Details
#initialize(api_class, *args) ⇒ WebSocket
Returns a new instance of WebSocket.
15 16 17 18 |
# File 'lib/ddp/server.rb', line 15 def initialize(api_class, *args) @api = api_class.new(*args) @subscriptions = {} end |
Instance Attribute Details
#api ⇒ Object
Returns the value of attribute api.
13 14 15 |
# File 'lib/ddp/server.rb', line 13 def api @api end |
#subscriptions ⇒ Object
Returns the value of attribute subscriptions.
13 14 15 |
# File 'lib/ddp/server.rb', line 13 def subscriptions @subscriptions end |
Instance Method Details
#on_open ⇒ Object
20 21 22 |
# File 'lib/ddp/server.rb', line 20 def on_open handle_connect end |