Class: PStream::CipherNegotiation
- Inherits:
-
Object
- Object
- PStream::CipherNegotiation
- Defined in:
- lib/pstream/cipher_negotiation.rb
Instance Attribute Summary collapse
-
#dst ⇒ Object
readonly
Returns the value of attribute dst.
-
#ipv ⇒ Object
readonly
Returns the value of attribute ipv.
-
#length ⇒ Object
Returns the value of attribute length.
-
#pstream ⇒ Object
readonly
Returns the value of attribute pstream.
-
#src ⇒ Object
readonly
Returns the value of attribute src.
-
#suite ⇒ Object
Returns the value of attribute suite.
-
#suites ⇒ Object
Returns the value of attribute suites.
Instance Method Summary collapse
-
#initialize(pstream, ipv, src, dst) ⇒ CipherNegotiation
constructor
A new instance of CipherNegotiation.
- #summary ⇒ Object
- #to_s ⇒ Object
Constructor Details
#initialize(pstream, ipv, src, dst) ⇒ CipherNegotiation
Returns a new instance of CipherNegotiation.
34 35 36 37 38 39 40 41 42 |
# File 'lib/pstream/cipher_negotiation.rb', line 34 def initialize(pstream, ipv, src, dst) @dst = dst @ipv = ipv @length = nil @pstream = pstream @src = src @suite = nil @suites = Array.new end |
Instance Attribute Details
#dst ⇒ Object (readonly)
Returns the value of attribute dst.
8 9 10 |
# File 'lib/pstream/cipher_negotiation.rb', line 8 def dst @dst end |
#ipv ⇒ Object (readonly)
Returns the value of attribute ipv.
9 10 11 |
# File 'lib/pstream/cipher_negotiation.rb', line 9 def ipv @ipv end |
#length ⇒ Object
Returns the value of attribute length.
4 5 6 |
# File 'lib/pstream/cipher_negotiation.rb', line 4 def length @length end |
#pstream ⇒ Object (readonly)
Returns the value of attribute pstream.
10 11 12 |
# File 'lib/pstream/cipher_negotiation.rb', line 10 def pstream @pstream end |
#src ⇒ Object (readonly)
Returns the value of attribute src.
11 12 13 |
# File 'lib/pstream/cipher_negotiation.rb', line 11 def src @src end |
#suite ⇒ Object
Returns the value of attribute suite.
5 6 7 |
# File 'lib/pstream/cipher_negotiation.rb', line 5 def suite @suite end |
#suites ⇒ Object
Returns the value of attribute suites.
6 7 8 |
# File 'lib/pstream/cipher_negotiation.rb', line 6 def suites @suites end |
Instance Method Details
#summary ⇒ Object
44 45 46 47 48 49 50 51 52 53 54 55 |
# File 'lib/pstream/cipher_negotiation.rb', line 44 def summary ret = Array.new ret.push( "#{hilight_ipv(@ipv)} #{hilight_hosts(@src, @dst)}" ) ret.push(" #{hilight_selected_suite(@suite)}") if (@suite) @suites.each do |suite| ret.push(" #{@pstream.hilight_cipher_suite(suite)}") end return ret.join("\n") end |
#to_s ⇒ Object
57 58 59 |
# File 'lib/pstream/cipher_negotiation.rb', line 57 def to_s return summary end |