The connection class manages the TCP connection to the Jabber server
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
Connects to the Jabber server through a TCP Socket and starts the Jabber parser.
# 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]