diff options
author | Jeff Hostetler <jeffhost@microsoft.com> | 2021-09-20 15:36:13 +0000 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-20 08:57:58 -0700 |
commit | a3e2033e04ae06ac4f1cda582ac83944df29830d (patch) | |
tree | 39f5235ded09296fda28bf705eaa2b905033d264 /Documentation/git-maintenance.txt | |
parent | trace2: add trace2_child_ready() to report on background children (diff) | |
download | tgif-a3e2033e04ae06ac4f1cda582ac83944df29830d.tar.xz |
simple-ipc: preparations for supporting binary messages.
Add `command_len` argument to the Simple IPC API.
In my original Simple IPC API, I assumed that the request would always
be a null-terminated string of text characters. The `command`
argument was just a `const char *`.
I found a caller that would like to pass a binary command to the
daemon, so I am amending the Simple IPC API to receive `const char
*command, size_t command_len` arguments.
I considered changing the `command` argument to be a `void *`, but the
IPC layer simply passes it to the pkt-line layer which takes a `const
char *`, so to avoid confusion I left it as is.
Note, the response side has always been a `struct strbuf` which
includes the buffer and length, so we already support returning a
binary answer. (Yes, it feels a little weird returning a binary
buffer in a `strbuf`, but it works.)
Signed-off-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-maintenance.txt')
0 files changed, 0 insertions, 0 deletions