Method: Pantry::Server#initialize

Defined in:
lib/pantry/server.rb

#initialize(network_stack_class = Communication::Server) ⇒ Server

Returns a new instance of Server.



12
13
14
15
16
17
18
19
20
# File 'lib/pantry/server.rb', line 12

def initialize(network_stack_class = Communication::Server)
  @commands = CommandHandler.new(self, Pantry.server_commands)
  @identity = current_hostname
  @clients  = []

  @client_registry = ClientRegistry.new

  @networking = network_stack_class.new_link(self)
end