// This file is part of Timmi. // // Timmi is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. #include #include #include int main(int argc, char *argv[]) { if (argc != 2 && argc != 3) { std::cerr << "Usage: " << argv[0] << " port [statsfile]" << std::endl; return EXIT_FAILURE; } ERRORLEVEL = VERBOSE; int port = atoi(argv[1]); TimmiServer server; if (argc == 3) { server.open_log(argv[2]); } if (server.bind_socket(port)) server.mainloop(); return EXIT_SUCCESS; }