ronnie
2022-10-14 1504bb53e29d3d46222c0b3ea994fc494b48e153
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
#ifndef _SERVER_API_H_V100_
#define _SERVER_API_H_V100_
 
 
/*
 * socket communication
 * init server, run server and handle client connection events
 * author: clarkyy
 * date: 20161110
 */
 
/*
 * init server
 * returns 0 if init success, <0 if something went wrong
 */
int init_server(int port);
 
/*
 * run server
 * this function will be running until get some exit message from client/server
 * returns 0 if exit normal, <0 if something went wrong
 */
int run_server();
 
/*
 * exit server
 * clean and exit
 */
void exit_server();
 
 
#endif /* _SERVER_API_H_V100_ */