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 unsigned int encrypted unsigned int proxy_support int timeout int connect_timeout git_stream_connect_cb connect git_stream_certificate_cb certificate git_stream_set_proxy_cb set_proxy git_stream_read_cb read git_stream_write_cb write git_stream_close_cb close git_stream_free_cb free };

Members

int
version
unsigned int
encrypted
unsigned 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.

connect

Callback to connect the stream.

certificate

Certificate lookup.

set_proxy

Set the proxy for the stream.

read

Read from the stream.

write

Write to the stream.

close

Close the stream.

free

Free the stream.

Parameter To

Versions