#include #include "../shared/GlobalConfigFile.h" #include "../shared/Ping.h" #include "../shared/ReplyToClient.h" #include "../shared/NewConnections.h" #include "../shared/InputFramework.h" #include "../shared/CommandDispatcher.h" #include "WireFormats.h" #include "ServerInteractiveTest.h" #include "ProxyThread.h" #include "SendTimeAsTos.h" int main(int argc, char **argv) { setlocale(LC_ALL, ""); addConfigItems("log_file_suffix=server"); if (!addConfigItemsFromCommandLine(argv + 1)) return 1; configItemsComplete(); int listenPort = strtolDefault(getConfigItem("listen_port", "1977"), -1); if (listenPort == -1) { std::cerr<<"Invalid listen port \""<getInput(), commandDispatcher->getInputCallbackId()); // Start listening to new sockets now, after the other modules have // had time to configure themselves. NewConnections newConnections(&listener, listenPort); if (!newConnections.getSuccess()) { std::cerr<<"Unable to listen for new connections.\n"; return 3; } /* L1Data l1; TosData tos; std::string result; try { marshal(result, l1); marshal(result, tos); // TODO marshal and unmarshal and make sure we get the same result back. std::cout<<"Success. "<