-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.cpp
More file actions
35 lines (30 loc) · 805 Bytes
/
server.cpp
File metadata and controls
35 lines (30 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "Utils/Files.hpp"
#include "Acceptor.hpp"
#include "AEvent/AEventTypes.hpp"
#include <iostream>
#include <ctime>
#include <vector>
#include <map>
#include <algorithm>
#include <memory>
int main(int argc, char* argv[])
{
auto cb = [](AEvPtrBase tptr, AEvExitSignal sin_num) -> int
{
std::cout << "Finising main async event." << std::endl;
return 0;
};
AEvRootConf main_conf(cb);
std::shared_ptr<Acceptor> conn = std::make_shared<Acceptor>(main_conf, "127.0.0.1", 8888);
conn->begin();
conn->run();
}
/// /////////////////////////////////////////
/// Task 2 for TrueConf.
/// TCP server.
/// Implementation:
/// Roman Progonnyj,
/// roman.progonnyj@gmail.com
/// +30 063 584 20 40
/// +38 098 545 36 68
/// /////////////////////////////////////////