testserver.c
416 Bytes
#include <stdio.h>
#include <socket.h>
#include "server.h"
#include "signalHandling.h"
static void
read_hook(const char * _buffer)
{
printf("%s\n", _buffer);
}
int
main()
{
LOGGER logger = new(LOGGER, NULL);
SERVER server = new(SERVER, logger, 11212, SOMAXCONN);
server->read_hook = read_hook;
init_signals();
server_run(server);
delete(&server);
delete(&logger);
return 0;
}
// vim: set ts=4 sw=4: