summaryrefslogtreecommitdiff
path: root/simple-ipc.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2021-10-13 22:15:57 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-10-13 22:15:58 (GMT)
commitaf303ee39214a04ad3c01e5924f2e8c09b5c18cb (patch)
treea11254d63d48bb387ed4bdd3927568d9ff9e0276 /simple-ipc.h
parenta5e61a4225a7319ab5fdd6d7b63e250f5b08255c (diff)
parent05881a6fc9020b5c227a98490bf256d129da01f6 (diff)
downloadgit-af303ee39214a04ad3c01e5924f2e8c09b5c18cb.zip
git-af303ee39214a04ad3c01e5924f2e8c09b5c18cb.tar.gz
git-af303ee39214a04ad3c01e5924f2e8c09b5c18cb.tar.bz2
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.h21
1 files changed, 12 insertions, 9 deletions
diff --git a/simple-ipc.h b/simple-ipc.h
index 08b2908..a849d9f 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);