Class: Ciri::DevP2P::Protocol

Inherits:
Object
  • Object
show all
Defined in:
lib/ciri/devp2p/protocol.rb

Overview

protocol represent DevP2P sub protocols

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(name:, version:, length:) ⇒ Protocol

Returns a new instance of Protocol.


36
37
38
39
40
# File 'lib/ciri/devp2p/protocol.rb', line 36

def initialize(name:, version:, length:)
  @name = name
  @version = version
  @length = length
end

Instance Attribute Details

#lengthObject (readonly)

Returns the value of attribute length


33
34
35
# File 'lib/ciri/devp2p/protocol.rb', line 33

def length
  @length
end

#nameObject (readonly)

Returns the value of attribute name


33
34
35
# File 'lib/ciri/devp2p/protocol.rb', line 33

def name
  @name
end

#node_infoObject

Returns the value of attribute node_info


34
35
36
# File 'lib/ciri/devp2p/protocol.rb', line 34

def node_info
  @node_info
end

#peer_infoObject

Returns the value of attribute peer_info


34
35
36
# File 'lib/ciri/devp2p/protocol.rb', line 34

def peer_info
  @peer_info
end

#startObject

Returns the value of attribute start


34
35
36
# File 'lib/ciri/devp2p/protocol.rb', line 34

def start
  @start
end

#versionObject (readonly)

Returns the value of attribute version


33
34
35
# File 'lib/ciri/devp2p/protocol.rb', line 33

def version
  @version
end