forked from p308945/MyNetWorkLib
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.cpp
More file actions
30 lines (29 loc) · 914 Bytes
/
test.cpp
File metadata and controls
30 lines (29 loc) · 914 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
/*************************************************************************
> File Name: test.cpp
> Author: huangyun
> Mail: 895175589@qq.com
> Created Time: Fri 07 Aug 2015 09:58:04 PM
************************************************************************/
#include "MyServer.h"
#include "../base/MySockTaskManager.h"
//#include "../base/MyHashFunction.h"
#include "../base/MyConstHash.h"
int main()
{
MyNameSpace::MyServer server;
if (!server.init(50002))
{
std::cerr<<__FUNCTION__<<"("<<__LINE__<<"): server init fail"<<std::endl;
exit(1);
}
/*
std::cout<<MyNameSpace::SDBMHash("tg34tg")<<std::endl;
std::cout<<MyNameSpace::SDBMHash("vrevg45")<<std::endl;
std::cout<<MyNameSpace::SDBMHash("vervgre")<<std::endl;
std::cout<<MyNameSpace::SDBMHash("56y756fd")<<std::endl;
std::cout<<MyNameSpace::SDBMHash("t45t54")<<std::endl;
*/
server.mainLoop();
server.fini();
return 0;
}