TabFS/fs/common.h
Omar Rizwan 784ec83696 Rewrite and refactor C half. No more shared memory! It's fast!
Three C modules:
- tabfs (main thread; talks to FUSE)
- common (tabfs<->ws communication helpers)
- ws (side thread; talks to browser over WebSocket)

It's single-threaded, but I don't think that matters anyway.
2019-02-25 13:02:25 -08:00

19 lines
370 B
C

#ifndef COMMON_H
#define COMMON_H
#include <sys/types.h>
#define DEBUG(...)
void common_init();
typedef int (*fd_set_filler_fn_t)(fd_set*, fd_set*, fd_set*);
void common_send_tabfs_to_ws(char *request_data);
char *common_receive_tabfs_to_ws(fd_set_filler_fn_t filler);
void common_send_ws_to_tabfs(char *response_data);
char *common_receive_ws_to_tabfs();
#endif