Class: Blather::Stream::Client
Constant Summary
collapse
- LANG =
'en'
- VERSION =
'1.0'
- NAMESPACE =
'jabber:client'
STREAM_NS
Instance Attribute Summary
#authcid, #jid, #password
Instance Method Summary
collapse
connect, #connection_completed, #initialize, #post_init, #receive, #receive_data, #ssl_verify_peer, start, #unbind
Instance Method Details
#cleanup ⇒ Object
20
21
22
23
|
# File 'lib/blather/stream/client.rb', line 20
def cleanup
@parser.finish if @parser
super
end
|
#send(stanza) ⇒ Object
15
16
17
18
|
# File 'lib/blather/stream/client.rb', line 15
def send(stanza)
stanza.from = self.jid if stanza.is_a?(Stanza) && !stanza.from.nil?
super stanza
end
|
#start ⇒ Object
10
11
12
13
|
# File 'lib/blather/stream/client.rb', line 10
def start
@parser = Parser.new self
send "<stream:stream to='#{@to}' xmlns='#{NAMESPACE}' xmlns:stream='#{STREAM_NS}' version='#{VERSION}' xml:lang='#{LANG}'>"
end
|