diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-17 23:03:59 +0200 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-07-18 00:38:50 +0200 |
commit | e05f02acd583797ceb449fc501d371d45a4293c1 (patch) | |
tree | 491322cf633b67918f0361c1ce986f6b690844bc /src/protocol.h | |
parent | docker: sanitize package dependencies (diff) | |
download | cimple-e05f02acd583797ceb449fc501d371d45a4293c1.tar.gz cimple-e05f02acd583797ceb449fc501d371d45a4293c1.zip |
switch to JSON-RPC as message format
Instead of the weird `struct msg` I had, I switched to the JSON-RPC
format. It's basically the same, but has a well-defined semantics in
case of errors.
Diffstat (limited to 'src/protocol.h')
-rw-r--r-- | src/protocol.h | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/protocol.h b/src/protocol.h index 99ec3ee..765e6cf 100644 --- a/src/protocol.h +++ b/src/protocol.h @@ -8,18 +8,20 @@ #ifndef __PROTOCOL_H__ #define __PROTOCOL_H__ -#include "msg.h" +#include "json_rpc.h" #include "process.h" #include "run_queue.h" -int msg_run_parse(const struct msg *, struct run **); +int run_request_create(struct jsonrpc_request **, const struct run *); +int run_request_parse(const struct jsonrpc_request *, struct run **); -int msg_new_worker_create(struct msg **); +int new_worker_request_create(struct jsonrpc_request **); +int new_worker_request_parse(const struct jsonrpc_request *); -int msg_start_create(struct msg **, const struct run *); -int msg_start_parse(const struct msg *, struct run **); +int start_request_create(struct jsonrpc_request **, const struct run *); +int start_request_parse(const struct jsonrpc_request *, struct run **); -int msg_finished_create(struct msg **, int run_id, const struct proc_output *); -int msg_finished_parse(const struct msg *, int *run_id, struct proc_output **); +int finished_request_create(struct jsonrpc_request **, int run_id, const struct proc_output *); +int finished_request_parse(const struct jsonrpc_request *, int *run_id, struct proc_output **); #endif |