35 lines
740 B
C++
35 lines
740 B
C++
#include "Archimedes.h"
|
|
|
|
#include "modules/ServerModule/ServerModule.h"
|
|
|
|
class ChatServer : public Archimedes::Module {
|
|
|
|
public:
|
|
|
|
ChatServer(Archimedes::App* a, void* h) : Module(a, h) {
|
|
|
|
name = "ChatServer";
|
|
|
|
ServerModule* sm = new ServerModule(a, h);
|
|
deps[*sm] = sm;
|
|
sm->shouldHandleEvents(ServerModule::SMEventEnum::ConnectionStatusChanged | ServerModule::SMEventEnum::DataSent);
|
|
}
|
|
|
|
ChatServer() { name = "ChatServer"; }
|
|
|
|
~ChatServer() {
|
|
if(app) {}
|
|
}
|
|
|
|
void onLoad();
|
|
|
|
//void run();
|
|
|
|
bool onEvent(const Archimedes::Event&);
|
|
};
|
|
|
|
#ifdef CHATSERVER_DYNAMIC
|
|
typedef ChatServer mtype;
|
|
#include "endModule.h"
|
|
#endif
|