// Copyright (c) 2011, D-Media Communication Technology Inc.
// All rights reserved.
//
//
// ---
// Author: Yichi Zhang <zyichi@gmail.com>
//
// File content description here
#include "server.h"
#include <google/gflags.h>
#include <string>
#include <stdio.h>
DEFINE_bool(memory_pool,
false
,
"If use memory pool"
);
DEFINE_bool(daemon,
true
,
"If started as daemon"
);
DEFINE_string(module_id,
""
,
"Server module id"
);
DEFINE_int32(http_port, 80,
"HTTP listen port"
);
DEFINE_int32(https_port, 443,
"HTTPS listen port"
);
int
main(
int
argc,
char
** argv)
{
::google::ParseCommandLineFlags(&argc, &argv,
true
);
// XXX NOTE: Should add 'FLAGS_' prefix.
printf
(
"Server module id: %s\n"
, FLAGS_module_id.c_str());
if
(FLAGS_daemon) {
printf
(
"Run as daemon: %d\n"
, FLAGS_daemon);
}
if
(FLAGS_memory_pool) {
printf
(
"Use memory pool: %d\n"
, FLAGS_daemon);
}
Server server;
return
0;
}