Main Page   Namespace List   Class Hierarchy   Alphabetical List   Data Structures   File List   Namespace Members   Data Fields   Globals  

ExNihiloServer.cpp

Go to the documentation of this file.
00001 #include <ExNihiloServer.h>
00002 
00003 int main(int argc, char **argv)
00004 {
00005 Guard(int main(int argc, char **argv))
00006         int hsocket;
00007         std::cout<<"Starting ExNihilo Server"<<std::endl;
00008         
00009         if(signal(SIGINT,handlerSigint)==SIG_ERR)
00010         {
00011                 std::cout<<"Erreur d armement du signal"<<std::endl;
00012                 exit(1);
00013         }       
00014 
00015         ExCSocketServer ListenSocket;
00016         ListenSocket.SetSocketPort(5000);
00017         ListenSocket.Init();
00018         do 
00019         {
00020                 hsocket=ListenSocket.Listen();
00021                 std::cout<<"New client connected on socket :"<<hsocket<<std::endl;
00022         } while(1);
00023 UnGuard
00024 }
00025 
00026 void handlerSigint(int sig){Guard(void handlerSigint(int sig))
00027         std::cout<<"Leave server closing all conexion..."<<std::endl;
00028         exit(0);
00029 UnGuard
00030 }

Generated on Tue Dec 10 18:20:08 2002 for ExNihilo by doxygen1.3-rc1