From cd2decce51c32b8c0531a87ea849e9f8e80db0d3 Mon Sep 17 00:00:00 2001 From: Joursoir Date: Mon, 23 Nov 2020 20:07:36 +0300 Subject: server: add first (work with sockets) level of abstraction --- src/server/server.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/server/server.cpp (limited to 'src/server/server.cpp') 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 + +#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 -- cgit v1.2.3-18-g5258