代码拉取完成,页面将自动刷新
#pragma once
#include "ace/Task.h"
#include <Windows.h>
#include "ace/Log_Msg.h"
#include "ace/OS.h"
#include "ace/Thread_Mutex.h"
#include <WinSock2.h>
#include <string.h>
#include <stdio.h>
#include "nids.h"
#include "ffcs_logger.h"
#include "msgdefine.h"
#include "my_ringbuffbased_fifo.h"
#include <ace/Log_Msg.h>
#include <ace/OS.h>
#include <ace/Configuration.h>
#include <ace/Configuration_Import_Export.h>
#include <string>
class httpcaptor:public ACE_Task<ACE_MT_SYNCH> //capture tcp data
{
public:
httpcaptor(void);
~httpcaptor(void);
static httpcaptor* get_instance();
static void destroy_instance();
int init();
int load_config(const char * _config_filename);
int svc();
inline int set_cached_ringfifo(my_fifo<tcp_connection_info>* fifo){
if(!fifo){
return -1;
}
_ringfifo=fifo;
return 0;
}
inline int setLogger(Logger* logger){
if(!logger){
return -1;
}
_Log=logger;
return 0;
}
inline Logger* getLogger(){
return _Log;
}
inline void stopsvc(){
}
inline const std::string& get_err_msg()const{
return _errmsg;
}
inline void set_dumpfilepath(const char* path){
_dumpfilepath=path;
}
private:
friend void tcp_callback(struct tcp_stream *tcp_http_connection, void **param);
void put_data_into_fifo(tcp_connection_info& tci);
private:
static ACE_Thread_Mutex _mutex;
static httpcaptor* _instance;
Logger* _Log;
my_fifo<tcp_connection_info>* _ringfifo;
char _device[128];
std::string _errmsg;
std::string _dumpfilepath;
};
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。