Module: Adhearsion::XMPP::Connection

Defined in:
lib/adhearsion/xmpp/connection.rb

Class Method Summary collapse

Class Method Details

.start(jid, password, server, port) ⇒ Object

Open the XMPP connection

Parameters:

  • jid (String)

    the client/component JID to connect to

  • password (String)
  • server (String)
  • port (Integer)


14
15
16
17
18
19
20
21
22
# File 'lib/adhearsion/xmpp/connection.rb', line 14

def start(jid, password, server, port)
  Blather.logger = ahn_log.xmpp
  setup_client_object(jid, password, server, port)
  register_event_namespaces
  register_default_client_handlers
  Events.register_callback(:after_initialized) do
    connect
  end
end

.stopObject

Close the XMPP connection



25
26
27
# File 'lib/adhearsion/xmpp/connection.rb', line 25

def stop
  shutdown
end