Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
git2
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
git2
Commits
214457c6
Unverified
Commit
214457c6
authored
Jan 31, 2019
by
Edward Thomson
Committed by
GitHub
Jan 31, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4968 from tiennou/fix/documentation
Docs
parents
6853a250
9fd9126e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
12 deletions
+21
-12
include/git2/sys/transport.h
+21
-12
No files found.
include/git2/sys/transport.h
View file @
214457c6
...
@@ -296,19 +296,30 @@ typedef struct git_smart_subtransport_stream git_smart_subtransport_stream;
...
@@ -296,19 +296,30 @@ typedef struct git_smart_subtransport_stream git_smart_subtransport_stream;
/**
/**
* A stream used by the smart transport to read and write data
* A stream used by the smart transport to read and write data
* from a subtransport */
* from a subtransport.
*
* This provides a customization point in case you need to
* support some other communication method.
*/
struct
git_smart_subtransport_stream
{
struct
git_smart_subtransport_stream
{
/** The owning subtransport */
git_smart_subtransport
*
subtransport
;
/**< The owning subtransport */
git_smart_subtransport
*
subtransport
;
/** Read available data from the stream */
/**
* Read available data from the stream.
*
* The implementation may read less than requested.
*/
int
GIT_CALLBACK
(
read
)(
int
GIT_CALLBACK
(
read
)(
git_smart_subtransport_stream
*
stream
,
git_smart_subtransport_stream
*
stream
,
char
*
buffer
,
char
*
buffer
,
size_t
buf_size
,
size_t
buf_size
,
size_t
*
bytes_read
);
size_t
*
bytes_read
);
/** Write data to the stream */
/**
* Write data to the stream
*
* The implementation must write all data or return an error.
*/
int
GIT_CALLBACK
(
write
)(
int
GIT_CALLBACK
(
write
)(
git_smart_subtransport_stream
*
stream
,
git_smart_subtransport_stream
*
stream
,
const
char
*
buffer
,
const
char
*
buffer
,
...
@@ -321,7 +332,8 @@ struct git_smart_subtransport_stream {
...
@@ -321,7 +332,8 @@ struct git_smart_subtransport_stream {
/**
/**
* An implementation of a subtransport which carries data for the
* An implementation of a subtransport which carries data for the
* smart transport */
* smart transport
*/
struct
git_smart_subtransport
{
struct
git_smart_subtransport
{
/**
/**
* Setup a subtransport stream for the requested action.
* Setup a subtransport stream for the requested action.
...
@@ -362,13 +374,11 @@ typedef int GIT_CALLBACK(git_smart_subtransport_cb)(
...
@@ -362,13 +374,11 @@ typedef int GIT_CALLBACK(git_smart_subtransport_cb)(
* or how to move data back and forth. For this, a subtransport interface is
* or how to move data back and forth. For this, a subtransport interface is
* declared, and the smart transport delegates this work to the subtransports.
* declared, and the smart transport delegates this work to the subtransports.
*
*
* Three subtransports are provided by libgit2: git, http, and winhttp.
* Three subtransports are provided by libgit2: ssh, git, http(s).
* The http and winhttp transports each implement both http and https.
*
*
* Subtransports can either be RPC = 0 (persistent connection) or RPC = 1
* Subtransports can either be RPC = 0 (persistent connection) or RPC = 1
* (request/response). The smart transport handles the differences in its own
* (request/response). The smart transport handles the differences in its own
* logic. The git subtransport is RPC = 0, while http and winhttp are both
* logic. The git subtransport is RPC = 0, while http is RPC = 1.
* RPC = 1.
*/
*/
typedef
struct
git_smart_subtransport_definition
{
typedef
struct
git_smart_subtransport_definition
{
/** The function to use to create the git_smart_subtransport */
/** The function to use to create the git_smart_subtransport */
...
@@ -389,8 +399,7 @@ typedef struct git_smart_subtransport_definition {
...
@@ -389,8 +399,7 @@ typedef struct git_smart_subtransport_definition {
/**
/**
* Create an instance of the http subtransport.
* Create an instance of the http subtransport.
*
*
* This subtransport also supports https. On Win32, this subtransport may be
* This subtransport also supports https.
* implemented using the WinHTTP library.
*
*
* @param out The newly created subtransport
* @param out The newly created subtransport
* @param owner The smart transport to own this subtransport
* @param owner The smart transport to own this subtransport
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment