授权管理使用共享内存支持主从模式

This commit is contained in:
luwenpeng
2023-06-20 21:49:58 +08:00
parent 61233aac97
commit 4c8c7f8759
17 changed files with 430 additions and 138 deletions

View File

@@ -0,0 +1,23 @@
#ifndef _HASP_SHM_H
#define _HASP_SHM_H
#ifdef __cpluscplus
extern "C"
{
#endif
struct hasp_shm;
struct hasp_shm *hasp_shm_new(const char *name);
void hasp_shm_free(struct hasp_shm *shm);
void hasp_shm_lock(struct hasp_shm *shm);
void hasp_shm_unlock(struct hasp_shm *shm);
void hasp_shm_write(struct hasp_shm *shm, char *data, int len);
void hasp_shm_read(struct hasp_shm *shm, char *buff, int size);
#ifdef __cpluscplus
}
#endif
#endif