summaryrefslogtreecommitdiff
path: root/include/git2/sys
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-05-13 17:11:56 +0100
committerGitHub <noreply@github.com>2023-05-13 17:11:56 +0100
commit9d41a3fd694d983ade53fb602a58f6df25ce0656 (patch)
tree73fb6759a3138023f85654e38dcac1fb9cc4c7ad /include/git2/sys
parent905e4d19c2c401cef3964c2e28bf64b0dad77331 (diff)
parent8f695c806bac2b044f102c55b802e44f2d30ca01 (diff)
downloadlibgit2-9d41a3fd694d983ade53fb602a58f6df25ce0656.tar.gz
Merge pull request #6535 from libgit2/ethomson/timeouts
Diffstat (limited to 'include/git2/sys')
-rw-r--r--include/git2/sys/stream.h18
1 files changed, 16 insertions, 2 deletions
diff --git a/include/git2/sys/stream.h b/include/git2/sys/stream.h
index e0e03a2d7..3d28d09b3 100644
--- a/include/git2/sys/stream.h
+++ b/include/git2/sys/stream.h
@@ -29,8 +29,22 @@ GIT_BEGIN_DECL
typedef struct git_stream {
int version;
- int encrypted;
- int proxy_support;
+ int encrypted : 1,
+ proxy_support : 1;
+
+ /**
+ * Timeout for read and write operations; can be set to `0` to
+ * block indefinitely.
+ */
+ int timeout;
+
+ /**
+ * Timeout to connect to the remote server; can be set to `0`
+ * to use the system defaults. This can be shorter than the
+ * system default - often 75 seconds - but cannot be longer.
+ */
+ int connect_timeout;
+
int GIT_CALLBACK(connect)(struct git_stream *);
int GIT_CALLBACK(certificate)(git_cert **, struct git_stream *);
int GIT_CALLBACK(set_proxy)(struct git_stream *, const git_proxy_options *proxy_opts);