-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjtp.cpp
43 lines (39 loc) · 1.41 KB
/
jtp.cpp
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
40
41
42
43
/**
* class MdApi
* ----------------
* On functions from CThostFtdcMdSpi to put event into a queue
* OnFrontConnected()
* OnFrontDisconnected(int nReason)
* OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
* OnRspXXX(CThostFtdcXXXField *pXXX, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
* OnRtnXXX(CThostFtdcXXXField *pXXX) //2个通知推送
* ----------------
* API from CThostFtdcMdApi
* 3个请求API virtual int ReqXXX(CThostFtdcXXXField *pXXX, int nRequestID)
* ----------------
*
*/
/**
* class TdApi
* ----------------
* On functions from CThostFtdcTraderSpi to put event into a queue
* OnFrontConnected()
* OnFrontDisconnected(int nReason)
* OnRspError(CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
* OnRspXXX(CThostFtdcXXXField *pXXX, CThostFtdcRspInfoField *pRspInfo, int nRequestID, bool bIsLast)
* OnRtnXXX(CThostFtdcXXXField *pXXX) //26个通知推送
* OnErrXXX(CThostFtdcXXXField *pXXX, CThostFtdcRspInfoField *pRspInfo) //错误回报
* ----------------
* API from CThostFtdcMdApi
* 84个请求API virtual int ReqXXX(CThostFtdcXXXField *pXXX, int nRequestID)
* ----------------
*/
#include "jtp_mdapi.h"
#include "jtp_tdapi.h"
Napi::Object Init(Napi::Env env, Napi::Object exports)
{
exports = MdApi::AddonInit(env, exports);
exports = TdApi::AddonInit(env, exports);
return exports;
}
NODE_API_MODULE(jtp, Init)