libgit2

git_stream

Version:

Every stream must have this struct as its first element, so the API can talk to it. You'd define your stream as

struct my_stream { git_stream parent; ... }

and fill the functions

Signature

typedef struct git_stream { int version int encrypted int proxy_support int timeout int connect_timeout int (*)(struct git_stream *) connect int (*)(git_cert **, struct git_stream *) certificate int (*)(struct git_stream *, const git_proxy_options *) set_proxy ssize_t (*)(struct git_stream *, void *, size_t) read ssize_t (*)(struct git_stream *, const char *, size_t, int) write int (*)(struct git_stream *) close void (*)(struct git_stream *) free };

Members

int
version
int
encrypted
int
proxy_support
int
timeout

Timeout for read and write operations; can be set to 0 to block indefinitely.

int
connect_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 (*)(struct git_stream *)
connect
int (*)(git_cert **, struct git_stream *)
certificate
int (*)(struct git_stream *, const git_proxy_options *)
set_proxy
ssize_t (*)(struct git_stream *, void *, size_t)
read
ssize_t (*)(struct git_stream *, const char *, size_t, int)
write
int (*)(struct git_stream *)
close
void (*)(struct git_stream *)
free

Parameter To

Versions