Module: Sc2::Connection::ConnectionListener

Defined in:
lib/sc2ai/connection/connection_listener.rb

Overview

Callbacks should be included on your listening class noinspection RubyUnusedLocalVariable

Instance Method Summary collapse

Instance Method Details

#on_connected(connection) ⇒ Object

Called when connection established to application noinspection

Parameters:



11
12
13
# File 'lib/sc2ai/connection/connection_listener.rb', line 11

def on_connected(connection)
  Sc2.logger.debug { "#{self.class}.#{__method__} #{connection}" }
end

#on_connection_waiting(connection) ⇒ Object

Called while waiting on connection to application noinspection Lint/UnusedMethodArgument

Parameters:



18
19
20
# File 'lib/sc2ai/connection/connection_listener.rb', line 18

def on_connection_waiting(connection)
  Sc2.logger.debug { "#{self.class}.#{__method__} #{connection}" }
end

#on_disconnect(connection) ⇒ Object

Called when disconnected from application noinspection Lint/UnusedMethodArgument

Parameters:



25
26
27
# File 'lib/sc2ai/connection/connection_listener.rb', line 25

def on_disconnect(connection)
  Sc2.logger.debug { "#{self.class}.#{__method__} #{connection}" }
end