2019-02-06 13:22:03 +00:00
|
|
|
//
|
|
|
|
// instruct.h
|
|
|
|
// Net
|
|
|
|
//
|
|
|
|
// Created by 胡一兵 on 2019/2/5.
|
|
|
|
// Copyright © 2019年 Bakantu. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef instruct_h
|
|
|
|
#define instruct_h
|
|
|
|
|
|
|
|
#include "type.h"
|
|
|
|
#include "memory.h"
|
|
|
|
#include "clock.h"
|
|
|
|
#include "net.h"
|
|
|
|
#include "cproj.h"
|
|
|
|
#include "cpart.h"
|
|
|
|
#include "cmap.h"
|
|
|
|
#include "cthread.h"
|
|
|
|
#include "sha1.h"
|
|
|
|
#include "rsa.h"
|
2019-02-08 16:05:01 +00:00
|
|
|
#include "rng.hpp"
|
2019-02-06 13:22:03 +00:00
|
|
|
|
2019-02-08 14:11:07 +00:00
|
|
|
struct instructions{
|
|
|
|
int (*unpack)(string, vector<string> &, vector<string> &, vector<string> &) = NULL;
|
|
|
|
int (*construct)(string, vector<string> &, vector<string> &, vector<string> &) = NULL;
|
|
|
|
int (*update)(string, vector<string> &, vector<string> &, vector<string> &) = NULL;
|
|
|
|
int (*server)(string, vector<string> &, vector<string> &, vector<string> &) = NULL;
|
|
|
|
int (*client)(string, vector<string> &, vector<string> &, vector<string> &) = NULL;
|
|
|
|
int (*set)(string, vector<string> &, vector<string> &, vector<string> &) = NULL;
|
|
|
|
int (*init)(string, vector<string> &, vector<string> &, vector<string> &) = NULL;
|
|
|
|
};
|
|
|
|
|
|
|
|
int update(string instruct, vector<string> &configs, vector<string> &lconfigs, vector<string> &targets);
|
|
|
|
int construct(string instruct,vector<string> &config, vector<string> &lconfig, vector<string> &target);
|
|
|
|
int server(string instruct, vector<string> &configs, vector<string> &lconfigs, vector<string> &targets);
|
|
|
|
int client(string instruct, vector<string> &configs, vector<string> &lconfigs, vector<string> &targets);
|
|
|
|
int init(string instruct, vector<string> &configs, vector<string> &lconfigs, vector<string> &targets);
|
|
|
|
int set(string instruct, vector<string> &configs, vector<string> &lconfigs, vector<string> &targets);
|
|
|
|
|
|
|
|
|
|
|
|
bool config_search(vector<string> &configs,string tfg);
|
|
|
|
void getSQEPublicKey(respond *pres,void *args);
|
2019-02-11 04:40:39 +00:00
|
|
|
void registerSQECallback(respond *pres,void *args);
|
2019-03-05 05:03:19 +00:00
|
|
|
void loginSQECallback(respond *pres, void *args);
|
2019-02-17 10:40:37 +00:00
|
|
|
void* connectionDeamon(void *args);
|
2019-02-26 14:25:59 +00:00
|
|
|
//客户端连接管理守护进程
|
|
|
|
void *clientServiceDeamon(void *);
|
|
|
|
//实用函数
|
|
|
|
void gets_s(char *buff, uint32_t size);
|
2019-02-08 14:11:07 +00:00
|
|
|
|
2019-02-06 13:22:03 +00:00
|
|
|
#endif /* instruct_h */
|