2019-01-17 14:55:52 +00:00
|
|
|
//
|
|
|
|
// type.h
|
|
|
|
// Net
|
|
|
|
//
|
|
|
|
// Created by 胡一兵 on 2019/1/17.
|
|
|
|
// Copyright © 2019年 Bakantu. All rights reserved.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef type_h
|
|
|
|
#define type_h
|
|
|
|
|
|
|
|
#include <iostream>
|
|
|
|
#include <fstream>
|
|
|
|
#include <sstream>
|
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
#include <stdlib.h>
|
2019-02-25 00:04:36 +00:00
|
|
|
#include <string.h>
|
2019-01-17 14:55:52 +00:00
|
|
|
|
2019-02-01 16:56:24 +00:00
|
|
|
#include <algorithm>
|
2019-01-17 14:55:52 +00:00
|
|
|
#include <vector>
|
|
|
|
#include <list>
|
|
|
|
#include <string>
|
|
|
|
#include <map>
|
|
|
|
|
|
|
|
#include <sys/types.h>
|
|
|
|
#include <sys/socket.h>
|
2019-01-27 16:06:41 +00:00
|
|
|
#include<sys/wait.h>
|
2019-01-17 15:03:24 +00:00
|
|
|
#include <sys/time.h>
|
2019-02-21 11:02:31 +00:00
|
|
|
#include <sys/stat.h>
|
|
|
|
#include <sys/shm.h>
|
2019-01-17 14:55:52 +00:00
|
|
|
#include <netinet/in.h>
|
|
|
|
#include <arpa/inet.h>
|
|
|
|
#include <unistd.h>
|
|
|
|
#include <netdb.h>
|
|
|
|
#include <signal.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#include <errno.h>
|
2019-01-17 15:03:24 +00:00
|
|
|
#include <dlfcn.h>
|
2019-01-27 05:00:54 +00:00
|
|
|
#include <dirent.h>
|
|
|
|
#include <memory.h>
|
2019-01-29 08:24:45 +00:00
|
|
|
#include <sqlite3.h>
|
|
|
|
|
2019-02-11 04:40:39 +00:00
|
|
|
#include <rapidjson/document.h>
|
|
|
|
#include <rapidjson/writer.h>
|
|
|
|
#include <rapidjson/stringbuffer.h>
|
2019-02-25 09:26:25 +00:00
|
|
|
#include <rapidjson/prettywriter.h>
|
2019-02-11 04:40:39 +00:00
|
|
|
|
2019-01-17 14:55:52 +00:00
|
|
|
|
|
|
|
using std::string;
|
|
|
|
using std::vector;
|
|
|
|
using std::map;
|
|
|
|
using std::pair;
|
|
|
|
using std::list;
|
|
|
|
using std::ifstream;
|
|
|
|
using std::cout;
|
|
|
|
using std::endl;
|
2019-01-31 14:09:41 +00:00
|
|
|
using std::stringstream;
|
2019-01-17 14:55:52 +00:00
|
|
|
|
2019-02-11 04:40:39 +00:00
|
|
|
using namespace rapidjson;
|
|
|
|
|
2019-01-29 15:06:31 +00:00
|
|
|
typedef char Byte;
|
2019-02-11 04:40:39 +00:00
|
|
|
typedef unsigned char UByte;
|
2019-01-29 15:06:31 +00:00
|
|
|
|
2019-02-05 14:37:32 +00:00
|
|
|
#define REQUSET_TYPE 100
|
|
|
|
#define RESPOND_TYPE 101
|
2019-02-11 04:40:39 +00:00
|
|
|
#define ENCRYPT_POST_TYPE 102
|
2019-02-05 14:37:32 +00:00
|
|
|
|
2019-02-25 09:26:25 +00:00
|
|
|
//提示信息打印类函数
|
|
|
|
namespace error {
|
|
|
|
void printError(string error_info);
|
|
|
|
void printWarning(string warning_info);
|
|
|
|
void printSuccess(string succes_info);
|
|
|
|
void printRed(string red_info);
|
|
|
|
void printInfo(string info);
|
|
|
|
}
|
|
|
|
|
2019-01-17 14:55:52 +00:00
|
|
|
#endif /* type_h */
|