Sha256: 4750d755c6555673168752c7e8d85bec9d5d02049eba4bedd5ff3abe02b11418

Contents?: true

Size: 662 Bytes

Versions: 34

Compression:

Stored size: 662 Bytes

Contents

# encoding: UTF-8

module Vines
  class Stream
    class Client
      class Start < State
        def initialize(stream, success=TLS)
          super
        end

        def node(node)
          raise StreamErrors::NotAuthorized unless stream?(node)
          stream.start(node)
          doc = Document.new
          features = doc.create_element('stream:features') do |el|
            el << doc.create_element('starttls') do |tls|
              tls.default_namespace = NAMESPACES[:tls]
              tls << doc.create_element('required')
            end
          end
          stream.write(features)
          advance
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 4 rubygems

Version Path
diaspora-vines-0.2.0.develop.4 lib/vines/stream/client/start.rb
diaspora-vines-0.2.0.develop.3 lib/vines/stream/client/start.rb
diaspora-vines-0.2.0.develop.2 lib/vines/stream/client/start.rb
diaspora-vines-0.2.0.develop.1 lib/vines/stream/client/start.rb
diaspora-vines-0.1.28 lib/vines/stream/client/start.rb
lygneo-vines-0.1.5 lib/vines/stream/client/start.rb
lygneo-vines-0.1.1 lib/vines/stream/client/start.rb
diaspora-vines-0.1.27 lib/vines/stream/client/start.rb
diaspora-vines-0.1.26 lib/vines/stream/client/start.rb
diaspora-vines-0.1.25 lib/vines/stream/client/start.rb
diaspora-vines-0.1.24 lib/vines/stream/client/start.rb
vines-0.4.10 lib/vines/stream/client/start.rb
diaspora-vines-0.1.22 lib/vines/stream/client/start.rb
diaspora-vines-0.1.21 lib/vines/stream/client/start.rb
diaspora-vines-0.1.2 lib/vines/stream/client/start.rb
vines-0.4.9 lib/vines/stream/client/start.rb
vines-0.4.8 lib/vines/stream/client/start.rb
vines-0.4.7 lib/vines/stream/client/start.rb
vines-0.4.6 lib/vines/stream/client/start.rb
vinesmod-0.4.5.2 lib/vines/stream/client/start.rb