Class: EventMachine::Breakout::Connection
- Inherits:
-
WebSocket::Connection
- Object
- WebSocket::Connection
- EventMachine::Breakout::Connection
- Defined in:
- lib/em-breakout/connection.rb
Constant Summary collapse
- @@connection_counter =
0
Instance Attribute Summary collapse
-
#grid ⇒ Object
readonly
public name of worker-browser group.
-
#grid_name ⇒ Object
readonly
public name of worker-browser group.
-
#is_closing ⇒ Object
readonly
public name of worker-browser group.
Instance Method Summary collapse
Instance Attribute Details
#grid ⇒ Object (readonly)
public name of worker-browser group
6 7 8 |
# File 'lib/em-breakout/connection.rb', line 6 def grid @grid end |
#grid_name ⇒ Object (readonly)
public name of worker-browser group
6 7 8 |
# File 'lib/em-breakout/connection.rb', line 6 def grid_name @grid_name end |
#is_closing ⇒ Object (readonly)
public name of worker-browser group
6 7 8 |
# File 'lib/em-breakout/connection.rb', line 6 def is_closing @is_closing end |
Instance Method Details
#cid ⇒ Object
10 11 12 |
# File 'lib/em-breakout/connection.rb', line 10 def cid @cid ||= @@connection_counter += 1 end |
#close_websocket(msg = nil) ⇒ Object
14 15 16 17 18 19 20 |
# File 'lib/em-breakout/connection.rb', line 14 def close_websocket(msg=nil) unless @is_closing @is_closing = true send(msg) if msg super() end end |
#log(msg) ⇒ Object
22 23 24 |
# File 'lib/em-breakout/connection.rb', line 22 def log(msg) puts "** #{self.class.name.split('::').last} #{cid} ********** \n#{msg}\n\n\n" end |