Class: Vines::Stream::Server::Outbound::TLS

Inherits:
Vines::Stream::State show all
Defined in:
lib/vines/stream/server/outbound/tls.rb

Constant Summary collapse

NS =
NAMESPACES[:tls]

Constants inherited from Vines::Stream::State

Vines::Stream::State::BODY, Vines::Stream::State::STREAM

Instance Attribute Summary

Attributes inherited from Vines::Stream::State

#stream

Instance Method Summary collapse

Methods inherited from Vines::Stream::State

#==, #eql?, #hash

Methods included from Log

#log

Constructor Details

#initialize(stream, success = TLSResult) ⇒ TLS

Returns a new instance of TLS.



10
11
12
# File 'lib/vines/stream/server/outbound/tls.rb', line 10

def initialize(stream, success=TLSResult)
  super
end

Instance Method Details

#node(node) ⇒ Object



14
15
16
17
18
# File 'lib/vines/stream/server/outbound/tls.rb', line 14

def node(node)
  raise StreamErrors::NotAuthorized unless tls?(node)
  stream.write("<starttls xmlns='#{NS}'/>")
  advance
end