00001 /* 00002 * $Id: Client.cpp,v 1.5 2002/07/24 04:29:48 virtualcasino Exp $ 00003 */ 00004 #include<Client.h> 00005 #include<Server.h> 00006 #include<Protocol.h> 00007 00008 #define CLIENT (*this) 00009 extern SharedVar<int> counter; 00010 00011 Client::Client(Socket *s):Socket(s->getSocket(), s->getPort()){ 00012 Thread::setClassName("Client"); 00013 } 00014 00015 void *Client::run(){ 00016 String a; 00017 Protocol protocol(*this); 00018 #ifdef USE_DEBUG 00019 cout << "Thread started" << endl; 00020 #endif 00021 protocol.attend(); 00022 #ifdef USE_DEBUG 00023 cout << "Thread ended" << endl; 00024 #endif 00025 CLIENT.close(); 00026 counter--; 00027 return 0; 00028 }
Powered by: