Class Jabber::Connection
In: lib/xmpp4r/connection.rb
Parent: Stream
X XDelay XMuc XRoster XMucUser REXML::Element XRosterItem IqQuery XMLStanza IqVcard DiscoIdentity XMucUserItem DiscoItem Error RosterItem DiscoFeature IqQueryRoster IqQueryVersion IqQueryDiscoItems IqQueryDiscoInfo Message Presence Iq Singleton IdGenerator Connection Client Component Comparable JID RuntimeError ErrorException AuthenticationFailure RosterItem Stream StreamParser Roster Vcard Version lib/xmpp4r/authenticationfailure.rb lib/xmpp4r/iq/query/roster.rb lib/xmpp4r/idgenerator.rb lib/xmpp4r/iq/query/version.rb lib/xmpp4r/connection.rb lib/xmpp4r/x/mucuseritem.rb lib/xmpp4r/x/roster.rb lib/xmpp4r/iq.rb lib/xmpp4r/jid.rb lib/xmpp4r/iq/query.rb lib/xmpp4r/xmlstanza.rb lib/xmpp4r/x/delay.rb lib/xmpp4r/errorexception.rb lib/xmpp4r/client.rb lib/xmpp4r/stream.rb lib/xmpp4r/x/muc.rb lib/xmpp4r/streamparser.rb lib/xmpp4r/x.rb lib/xmpp4r/iq/vcard.rb lib/xmpp4r/iq/query/discoinfo.rb lib/xmpp4r/error.rb lib/xmpp4r/component.rb lib/xmpp4r/message.rb lib/xmpp4r/iq/query/discoitems.rb lib/xmpp4r/presence.rb lib/xmpp4r/helpers/roster.rb lib/xmpp4r/helpers/vcard.rb lib/xmpp4r/helpers/version.rb Helpers Jabber Module: Jabber

The connection class manages the TCP connection to the Jabber server

Methods

connect   new  

Attributes

host  [R] 
input  [R] 
output  [R] 
port  [R] 

Public Class methods

Create a new connection to the given host and port, using threaded mode or not.

[Source]

    # File lib/xmpp4r/connection.rb, line 17
17:     def initialize(threaded = true)
18:       super(threaded)
19:       @host = nil
20:       @port = nil
21:     end

Public Instance methods

Connects to the Jabber server through a TCP Socket and starts the Jabber parser.

[Source]

    # File lib/xmpp4r/connection.rb, line 27
27:     def connect(host, port)
28:       @host = host
29:       @port = port
30: 
31:       @socket = TCPSocket.new(@host, @port)
32:       start(@socket)
33:     end

[Validate]