forked from ry/v8worker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbinding.h
More file actions
32 lines (21 loc) · 689 Bytes
/
binding.h
File metadata and controls
32 lines (21 loc) · 689 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifdef __cplusplus
extern "C" {
#endif
void go_recv_cb(const char* msg, int table_index);
const char* go_recv_sync_cb(const char* msg, int table_index);
struct worker_s;
typedef struct worker_s worker;
const char* worker_version();
void v8_init();
worker* worker_new(int table_index);
// returns nonzero on error
// get error from worker_last_exception
int worker_load(worker* w, char* name_s, char* source_s);
const char* worker_last_exception(worker* w);
int worker_send(worker* w, const char* msg);
const char* worker_send_sync(worker* w, const char* msg);
void worker_dispose(worker* w);
void worker_terminate_execution(worker* w);
#ifdef __cplusplus
} // extern "C"
#endif