From 64bd1f3948e2ce57a1fb26196019855727290465 Mon Sep 17 00:00:00 2001 From: Omar Rizwan Date: Wed, 21 Oct 2020 15:53:27 -0700 Subject: fs: Attempt to switch to native messaging. It relays 1 message ok! --- fs/common.h | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 fs/common.h (limited to 'fs/common.h') diff --git a/fs/common.h b/fs/common.h deleted file mode 100644 index 7004c7b..0000000 --- a/fs/common.h +++ /dev/null @@ -1,34 +0,0 @@ -// common provides an interface for tabfs.c (which talks to FUSE) to -// talk to ws.c (which talks to the browser over WebSocket). - -#ifndef COMMON_H -#define COMMON_H - -#include - -#define DEBUG(...) - -void common_init(); - -typedef int (*fd_set_filler_fn_t)(fd_set*, fd_set*, fd_set*); - -// All send and receive calls are blocking! - -void common_send_tabfs_to_ws(char *request_data); -// This function is called by the ws thread; it blocks waiting for -// tabfs thread to send a request _from FUSE_, which means that the ws -// thread wouldn't be able to hear about events _from the browser_ -// while blocked here (including important ones, like 'the browser -// wants to connect to us!'). -// -// The hack solution is that ws passes a function `filler` to add the -// WebSocket file descriptors to the set that -// `common_receive_tabfs_to_ws` polls, so it _also_ waits on -// _browser-side_ events from the WebSocket file descriptors, not just -// FUSE-side events. -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 -- cgit v1.2.3