forked from corefan/TdxTradeServer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtts_server.h
39 lines (29 loc) · 823 Bytes
/
tts_server.h
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
#ifndef TTS_SERVER_H
#define TTS_SERVER_H
#include "tts_setting.h"
#include "tts_tradeapi.h"
#include "tts_encrypt.h"
#include <restbed>
#include <memory>
using namespace restbed;
using namespace std;
class TTS_Server
{
private:
TTS_SettingObject _setting;
Service service;
shared_ptr<Resource> resource;
shared_ptr<Resource> statusResource;
shared_ptr<Settings> restbed_settings;
shared_ptr<SSLSettings> ssl_settings;
shared_ptr<TTS_TradeApi> tradeApi;
shared_ptr<TTS_Encrypt> encryter;
unsigned long reqnum;
void performResponse(const shared_ptr< Session > session, string _noFunc);
public:
TTS_Server(const TTS_SettingObject& setting);
void start();
void stop();
void postMethodHandler(const shared_ptr< Session > session);
};
#endif // TTS_SERVER_H