18 |
|
|
19 |
//////////////////////////////////////////////////////////////////////////////// |
//////////////////////////////////////////////////////////////////////////////// |
20 |
// |
// |
21 |
// Server is the main chat server |
// Server is the main chat server |
22 |
// |
// |
23 |
//////////////////////////////////////////////////////////////////////////////// |
//////////////////////////////////////////////////////////////////////////////// |
24 |
|
|
32 |
|
|
33 |
class cServer : public ConnectionPlugin { |
class cServer : public ConnectionPlugin { |
34 |
private: |
private: |
35 |
SocketManager *socketManager; |
SocketManager *socketManager; |
36 |
UserManager *userManager; |
UserManager *userManager; |
37 |
|
|
38 |
// cServer(); |
// cServer(); |
39 |
|
|
40 |
// Display server start infos |
// Display server start infos |
41 |
void displayStartInfos(); |
void displayStartInfos(); |
42 |
void displayEndInfos(); |
void displayEndInfos(); |
43 |
public: |
public: |
44 |
cServer(); |
cServer(); |
45 |
// static cServer *Factory(int port); |
// static cServer *Factory(int port); |
|
|
|
|
~cServer(); |
|
46 |
|
|
47 |
// Launch the server |
~cServer(); |
48 |
void launch(int port); |
|
49 |
|
// Launch the server |
50 |
|
void launch(int port); |
51 |
|
void callCommand(int, string&); |
52 |
|
|
53 |
|
protected: |
54 |
|
void exportCommands(); |
55 |
}; |
}; |
56 |
|
|
57 |
#endif // _SERVER_H_ |
#endif // _SERVER_H_ |