Sha256: c03dd97632a2c51c0584b548c310b5b713990c58613ab7b66c1450074ee06baa

Contents?: true

Size: 451 Bytes

Versions: 1

Compression:

Stored size: 451 Bytes

Contents

module Blather
class Stream

  # @private
  class Client < Stream
    LANG = 'en'
    VERSION = '1.0'
    NAMESPACE = 'jabber:client'

    def start
      send "<stream:stream to='#{@to}' xmlns='#{NAMESPACE}' xmlns:stream='#{STREAM_NS}' version='#{VERSION}' xml:lang='#{LANG}'>"
    end

    def send(stanza)
      stanza.from = self.jid if stanza.is_a?(Stanza) && !stanza.from.nil?
      super stanza
    end

  end #Client

end #Stream
end #Blather

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
blather-0.8.2 lib/blather/stream/client.rb