为提高性能,改用c替换原本的flask
This commit is contained in:
24
c/tem/ctl.h
Normal file
24
c/tem/ctl.h
Normal file
@ -0,0 +1,24 @@
|
||||
#ifndef CTL
|
||||
#define CTL
|
||||
|
||||
#include <pthread.h>
|
||||
#include "tools/log/log.h"
|
||||
|
||||
#define MAX_BUF 256
|
||||
#define HISTORY_BUF 256
|
||||
#define PROMPT "chatbot$$ "
|
||||
|
||||
|
||||
typedef struct Ctl
|
||||
{
|
||||
int (*run)(struct Ctl*,int *);
|
||||
int (*infifo)(struct Ctl*,const char*);
|
||||
int index;
|
||||
char *history[HISTORY_BUF];
|
||||
pthread_t logwathcher;
|
||||
log_manager *logmanager;
|
||||
}Ctl;
|
||||
|
||||
Ctl *init_tem(log_manager *logmanager);
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user