diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-10-14 00:15:57 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-10-14 00:15:58 +0200 |
commit | af303ee39214a04ad3c01e5924f2e8c09b5c18cb (patch) | |
tree | a11254d63d48bb387ed4bdd3927568d9ff9e0276 /simple-ipc.h | |
parent | Merge branch 'ab/config-based-hooks-1' (diff) | |
parent | t/helper/simple-ipc: convert test-simple-ipc to use start_bg_command (diff) | |
download | git-af303ee39214a04ad3c01e5924f2e8c09b5c18cb.tar.xz git-af303ee39214a04ad3c01e5924f2e8c09b5c18cb.zip |
Merge branch 'jh/builtin-fsmonitor-part1'
Built-in fsmonitor (part 1).
* jh/builtin-fsmonitor-part1:
t/helper/simple-ipc: convert test-simple-ipc to use start_bg_command
run-command: create start_bg_command
simple-ipc/ipc-win32: add Windows ACL to named pipe
simple-ipc/ipc-win32: add trace2 debugging
simple-ipc: move definition of ipc_active_state outside of ifdef
simple-ipc: preparations for supporting binary messages.
trace2: add trace2_child_ready() to report on background children
Diffstat (limited to 'simple-ipc.h')
-rw-r--r-- | simple-ipc.h | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/simple-ipc.h b/simple-ipc.h index 08b2908d5f..a849d9f841 100644 --- a/simple-ipc.h +++ b/simple-ipc.h @@ -5,13 +5,6 @@ * See Documentation/technical/api-simple-ipc.txt */ -#ifdef SUPPORTS_SIMPLE_IPC -#include "pkt-line.h" - -/* - * Simple IPC Client Side API. - */ - enum ipc_active_state { /* * The pipe/socket exists and the daemon is waiting for connections. @@ -43,6 +36,13 @@ enum ipc_active_state { IPC_STATE__OTHER_ERROR, }; +#ifdef SUPPORTS_SIMPLE_IPC +#include "pkt-line.h" + +/* + * Simple IPC Client Side API. + */ + struct ipc_client_connect_options { /* * Spin under timeout if the server is running but can't @@ -103,7 +103,8 @@ void ipc_client_close_connection(struct ipc_client_connection *connection); */ int ipc_client_send_command_to_connection( struct ipc_client_connection *connection, - const char *message, struct strbuf *answer); + const char *message, size_t message_len, + struct strbuf *answer); /* * Used by the client to synchronously connect and send and receive a @@ -115,7 +116,8 @@ int ipc_client_send_command_to_connection( */ int ipc_client_send_command(const char *path, const struct ipc_client_connect_options *options, - const char *message, struct strbuf *answer); + const char *message, size_t message_len, + struct strbuf *answer); /* * Simple IPC Server Side API. @@ -140,6 +142,7 @@ typedef int (ipc_server_reply_cb)(struct ipc_server_reply_data *, */ typedef int (ipc_server_application_cb)(void *application_data, const char *request, + size_t request_len, ipc_server_reply_cb *reply_cb, struct ipc_server_reply_data *reply_data); |