testserver.c 669 Bytes
#include <stdio.h>
#include <socket.h>
#include <string.h>

#include <sys/time.h>
#include <sys/resource.h>

#include "server.h"
#include "logger.h"
#include "http/worker.h"

#include "signalHandling.h"

#include "interface/class.h"

void daemonize(void);

int
main()
{
	Logger logger     = new(LoggerSyslog, LOGGER_ERR);
	HttpWorker worker = new(HttpWorker, "my");
	Server server     = new(Server, logger, worker, 11212, SOMAXCONN);

	struct rlimit limit = {RLIM_INFINITY, RLIM_INFINITY};
	setrlimit(RLIMIT_CPU, &limit);

	init_signals();
	//daemonize();
	serverRun(server);

	delete(&server);
	delete(&worker);
	delete(&logger);

	return 0;
}

// vim: set ts=4 sw=4: