diff options
author | Joursoir <chat@joursoir.net> | 2020-11-23 20:07:36 +0300 |
---|---|---|
committer | Joursoir <chat@joursoir.net> | 2020-11-23 20:07:36 +0300 |
commit | cd2decce51c32b8c0531a87ea849e9f8e80db0d3 (patch) | |
tree | 7ee12a1ff8ba8ad95036e63dac186d40f97e0a5c /src/server/server.cpp | |
parent | a2ee75888739b66b3bd20d2a1f1e465947f1fbc4 (diff) | |
download | want-chat-cd2decce51c32b8c0531a87ea849e9f8e80db0d3.tar.gz want-chat-cd2decce51c32b8c0531a87ea849e9f8e80db0d3.tar.bz2 want-chat-cd2decce51c32b8c0531a87ea849e9f8e80db0d3.zip |
server: add first (work with sockets) level of abstraction
Diffstat (limited to 'src/server/server.cpp')
-rw-r--r-- | src/server/server.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/server/server.cpp b/src/server/server.cpp new file mode 100644 index 0000000..6834ceb --- /dev/null +++ b/src/server/server.cpp @@ -0,0 +1,20 @@ +#include <stdio.h> + +#include "chat.hpp" + +int main(int argc, char *argv[]) +{ + /* Event-driven programming */ + /* + 1) selection event + 2) event handling + */ + EventSelector *selector = new EventSelector; + /*ChatServer *serv = ChatServer::Start(selector, port); + if(!serv) { + perror("server"); + return 1; + }*/ + selector->Run(); + return 0; +}
\ No newline at end of file |