module Blather class Stream class Component < Stream NAMESPACE = 'jabber:component:accept' def receive(node) # :nodoc: if node.element_name == 'handshake' @client.stream_started(self) else super end if node.element_name == 'stream:stream' send("#{Digest::SHA1.hexdigest(@node['id']+@pass)}") end end protected def start @parser = Parser.new self start_stream = <<-STREAM STREAM send start_stream.gsub(/\s+/, ' ') end end #Client end #Stream end #Blather