Class Jabber::Connection
In: lib/xmpp4r/connection.rb
Parent: Stream

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]