diff options
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/sys/stream.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/include/git2/sys/stream.h b/include/git2/sys/stream.h index 55a714bbb..2b4ff7fd8 100644 --- a/include/git2/sys/stream.h +++ b/include/git2/sys/stream.h @@ -39,6 +39,19 @@ typedef struct git_stream { void (*free)(struct git_stream *); } git_stream; +typedef int (*git_stream_cb)(git_stream **out, const char *host, const char *port); + +/** + * Register a TLS stream constructor for the library to use + * + * If a constructor is already set, it will be overwritten. Pass + * `NULL` in order to deregister the current constructor. + * + * @param ctor the constructor to use + * @return 0 or an error code + */ +GIT_EXTERN(int) git_stream_register_tls(git_stream_cb ctor); + GIT_END_DECL #endif |
