class Falcon::Service::Supervisor

def setup(container)

@parameter container [Async::Container::Generic]
Start the supervisor process which accepts connections from the bound endpoint and processes JSON formatted messages.
def setup(container)
	container.run(name: self.name, restart: true, count: 1) do |instance|
		Async do
			@bound_endpoint.accept do |peer|
				stream = Async::IO::Stream.new(peer)
				
				while message = stream.gets("\0")
					response = handle(JSON.parse(message, symbolize_names: true))
					stream.puts(response.to_json, separator: "\0")
				end
			end
			
			instance.ready!
		end
	end
	
	super
end