Project

General

Profile

Feature #2758 » ZJ_ACSserver.h

yan hong, 06/19/2023 03:34 PM

 
1
#ifndef _ZA_ACSSERVERPROC
2
#define _ZA_ACSSERVERPROC
3

    
4
#include <string> 
5
#include <sstream>
6
#include "thirdparty/json.h"
7
#include "ZJ_ACSputRdb.h"
8

    
9
typedef unsigned long long uint64_netmo;
10
//typedef unsigned int uint32;
11

    
12
//???ؿͻ??˽??????
13
enum ResultType{
14
	RESPONSE_ERROR_DATAFORMAT = 0,	//???????ݸ?ʽ????
15
	RESPONSE_SUCCESS = 200,			//????ɹ?
16
	RESPONSE_FAILED = 404,			//????ʧ??
17
	RESPONSE_ERROR_UNKNOWN
18
};
19

    
20
class RestfulServer
21
{
22
public:
23
	RestfulServer() {}
24
	~RestfulServer() {}
25
	bool Start(const std::string &port, void *);
26
	bool Close(); // ?ر?
27
	//private:
28
	//	static void ev_handler(struct mg_connection *nc, int ev, void *ev_data);
29
	//
30
	//	struct mg_mgr m_mgr;
31
	//	struct mg_connection *m_nc;
32
	//	struct mg_bind_opts m_bind_opts;
33
};
34

    
35
#endif
(8-8/13)