// // 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" #include "rng.hpp" struct instructions{ int (*unpack)(string, vector &, vector &, vector &) = NULL; int (*construct)(string, vector &, vector &, vector &) = NULL; int (*update)(string, vector &, vector &, vector &) = NULL; int (*server)(string, vector &, vector &, vector &) = NULL; int (*client)(string, vector &, vector &, vector &) = NULL; int (*set)(string, vector &, vector &, vector &) = NULL; int (*init)(string, vector &, vector &, vector &) = NULL; }; int update(string instruct, vector &configs, vector &lconfigs, vector &targets); int construct(string instruct,vector &config, vector &lconfig, vector &target); int server(string instruct, vector &configs, vector &lconfigs, vector &targets); int client(string instruct, vector &configs, vector &lconfigs, vector &targets); int init(string instruct, vector &configs, vector &lconfigs, vector &targets); int set(string instruct, vector &configs, vector &lconfigs, vector &targets); bool config_search(vector &configs,string tfg); void getSQEPublicKey(respond *pres,void *args); void registerSQECallback(respond *pres,void *args); void loginSQECallback(respond *pres, void *args); void* connectionDeamon(void *args); //客户端连接管理守护进程 void *clientServiceDeamon(void *); //实用函数 void gets_s(char *buff, uint32_t size); #endif /* instruct_h */