libgit2

git_smart_subtransport_stream

Version:

A stream used by the smart transport to read and write data from a subtransport.

This provides a customization point in case you need to support some other communication method.

Signature

typedef struct git_smart_subtransport_stream { git_smart_subtransport *subtransport int (*)(git_smart_subtransport_stream *, char *, size_t, size_t *) read int (*)(git_smart_subtransport_stream *, const char *, size_t) write void (*)(git_smart_subtransport_stream *) free };

Members

subtransport

The owning subtransport

int (*)(git_smart_subtransport_stream *, char *, size_t, size_t *)
read

Read available data from the stream.

The implementation may read less than requested.

int (*)(git_smart_subtransport_stream *, const char *, size_t)
write

Write data to the stream

The implementation must write all data or return an error.

void (*)(git_smart_subtransport_stream *)
free

Free the stream

Versions