work on ClientModule, add ChatServer
This commit is contained in:
29
modules/examples/ChatServer/src/ChatServer.h
Normal file
29
modules/examples/ChatServer/src/ChatServer.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#include "Archimedes.h"
|
||||
|
||||
#include "modules/ServerModule/src/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&);
|
||||
};
|
||||
Reference in New Issue
Block a user