Class: Slack::RealTime::Concurrency::Eventmachine::Socket

Inherits:
Socket
  • Object
show all
Defined in:
lib/slack/real_time/concurrency/eventmachine.rb

Instance Attribute Summary

Attributes inherited from Socket

#driver, #options, #url

Instance Method Summary collapse

Methods inherited from Socket

#connect!, #connected?, #disconnect!, #initialize, #start_sync

Constructor Details

This class inherits a constructor from Slack::RealTime::Socket

Instance Method Details

#send_data(message) ⇒ Object


17
18
19
# File 'lib/slack/real_time/concurrency/eventmachine.rb', line 17

def send_data(message)
  driver.send(message)
end

#start_async {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:


9
10
11
12
13
14
15
# File 'lib/slack/real_time/concurrency/eventmachine.rb', line 9

def start_async
  thread = ensure_reactor_running

  yield self if block_given?

  thread
end