-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathserver.cpp
More file actions
39 lines (34 loc) · 827 Bytes
/
server.cpp
File metadata and controls
39 lines (34 loc) · 827 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
36
37
38
39
#include"sock_macro.cpp"
#include"dbms.cpp"
#include"splug.cpp"
using namespace std;
int main()
{
system("clear");
char ch;
int flag=1;
while(1)
{
splug obj;
if(obj.bind_socket()==-1)
return -1;
// obj.bind_socket();
if(obj.listen_in()==-1)
return -1;
if(obj.accept_call()==-1)
return -1;
obj.close_listening();
obj.connect_message();
while(flag==1)
{
// auto start=chrono::system_clock::now();
flag=obj.data();
// auto endf=chrono::system_clock::now();
// chrono::duration<double> epl=endf-start;
// cout<<"\033[1;33m"<<epl.count()<<"\033[0m"<<endl;
::counts++;
obj.data_to_dbms();
}
}
return 0;
}