Class: Equity::Node::Static

Inherits:
Equity::Node show all
Defined in:
lib/equity/node.rb

Instance Attribute Summary collapse

Attributes inherited from Equity::Node

#address, #client_address, #client_port, #counter, #failure_counter, #port

Instance Method Summary collapse

Methods inherited from Equity::Node

#connected?, #initialize, #shutdown?, #stop_accepting!, #to_s, with_socket

Constructor Details

This class inherits a constructor from Equity::Node

Instance Attribute Details

#counter=(value) ⇒ Object (writeonly)

Sets the attribute counter

Parameters:

  • value

    the value to set the attribute counter to.



90
91
92
# File 'lib/equity/node.rb', line 90

def counter=(value)
  @counter = value
end

Instance Method Details

#connect(client) ⇒ Object

Raises:

  • (RuntimeError)


96
97
98
# File 'lib/equity/node.rb', line 96

def connect(client)
  raise(RuntimeError, 'static nodes cannot be connected')
end

#connected=(bool) ⇒ Object



92
93
94
# File 'lib/equity/node.rb', line 92

def connected=(bool)
  @client = bool
end

#disconnectObject

Raises:

  • (RuntimeError)


100
101
102
# File 'lib/equity/node.rb', line 100

def disconnect
  raise(RuntimeError, 'static nodes cannot be disconnected')
end

#owns_socket?(socket) ⇒ Boolean

Returns:

  • (Boolean)


108
109
110
# File 'lib/equity/node.rb', line 108

def owns_socket?(socket)
  false
end

#socketsObject



104
105
106
# File 'lib/equity/node.rb', line 104

def sockets
  []
end