diff options
| author | Egor Tensin <Egor.Tensin@gmail.com> | 2022-08-25 11:31:34 +0200 |
|---|---|---|
| committer | Egor Tensin <Egor.Tensin@gmail.com> | 2022-08-25 11:33:42 +0200 |
| commit | b5980c321f83dd6cb57302becd72642b462fb68f (patch) | |
| tree | b796e855947df96d052a8ce5bcbabca967912c81 /src/msg.h | |
| parent | net: rework API (diff) | |
| download | cimple-b5980c321f83dd6cb57302becd72642b462fb68f.tar.gz cimple-b5980c321f83dd6cb57302becd72642b462fb68f.zip | |
msg: refactoring
Diffstat (limited to 'src/msg.h')
| -rw-r--r-- | src/msg.h | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -6,17 +6,16 @@ struct msg { char **argv; }; +void msg_free(const struct msg *); + int msg_from_argv(struct msg *, const char *argv[]); +int msg_recv(int fd, struct msg *); int msg_send(int fd, const struct msg *); -int msg_send_and_wait_for_result(int fd, const struct msg *, int *result); typedef int (*msg_handler)(const struct msg *, void *arg); - -int msg_recv(int fd, struct msg *); -int msg_recv_and_send_result(int fd, msg_handler, void *arg); - -void msg_free(const struct msg *); +int msg_send_and_wait(int fd, const struct msg *, int *result); +int msg_recv_and_handle(int fd, msg_handler, void *arg); int msg_dump_unknown(const struct msg *); |
