Скачиваний:
32
Добавлен:
01.05.2014
Размер:
874 б
Скачать
//” ©«: Server.h
//Љ« бб "‘ҐаўҐа". Џа®в®вЁЇ.
//Ђўв®а: ‘ҐаЈҐҐў Њ.‚. Ја.3352
//„ в : 21.05.06, ђҐ¤ ЄжЁп: 1.0

#ifndef ServerH
#define ServerH

#include "Client.h"
//#include "SrvList.h"
#include "SrvList.cpp"
#include "Message.h"

class CClient;
class CServer
{
  private:
    CSrvList* clients;		//registered clients
    static int nextID;
    const int id;
    static int count;
    
  public:
    virtual int regCl(CClient*c);	//register clients on server
    virtual int resend(CMsg* m);		//resend msg from registred user to registred user
    virtual int resendAll(CClient* from, int comm);
	CServer* getPointer(); 
	CClient* getClientByID(int id);
    CServer(); //constructor
    virtual ~CServer();//destructor
    void show()const;		//show info
    int getID()const;
};


int CServer::nextID = 0;
int CServer::count = 0;
#endif
 
Соседние файлы в папке Kurs