Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

/home/rdbrown/doxygen/cse125g1/src/game/server/Server.cpp

00001 #include "tnl/tnl.h"
00002 #include "tnl/tnlLog.h"
00003 
00004 #include "net/NetServer.h"
00005 #include "net/MMConnection.h"
00006 
00007 #include <iostream>
00008 
00009 MMNet::MMConnection testconn;
00010 
00011 class StderrLogConsumer : public TNL::LogConsumer
00012 {
00013 public:
00014    void logString(const char *string)
00015    {
00016       std::cerr << string << std::endl;
00017    }
00018 };
00019 
00020 
00021 int main() {
00022     using namespace TNL;
00023     StderrLogConsumer logger; 
00024     TNLLogEnable(LogGhostConnection, true);
00025     TNLLogEnable(LogEventConnection, true);
00026     TNLLogEnable(LogNetConnection, true);
00027 
00028     MMNet::NetServer *server = new MMNet::NetServer(TNL::Address(IPProtocol, Address::Any, 28000));  
00029     
00030     for(;;) {
00031         // Lets not hog the CPU...            
00032         server->idle();
00033         TNL::Platform::sleep(10);
00034     }
00035     
00036     return 0;   
00037 }

Generated on Thu Aug 18 16:03:09 2005 for Robin Hood: Thieves & Knights by doxygen1.2.18