FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
git2cpp/src/wasm/stream.hpp at main · QuantStack/git2cpp · GitHub
QuantStack
git2cpp
Repository navigation
Code
Issues
6
(6)
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
git2cpp
/
src
/
wasm
/
stream.hpp
Copy path
More file actions
More file actions
Latest commit
History
History
History
46 lines (33 loc) · 1.3 KB
Breadcrumbs
git2cpp
/
src
/
wasm
/
stream.hpp
Copy path
File metadata and controls
46 lines (33 loc) · 1.3 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
#
pragma
once
#
ifdef
EMSCRIPTEN
#
include
<
git2/sys/transport.h
>
#
include
"
libgit2_internals.hpp
"
#
include
"
response.hpp
"
#
include
"
subtransport.hpp
"
//
A stream represents a single http/https request.
struct
wasm_http_stream
{
wasm_http_stream
(wasm_http_subtransport* subtransport, http_service service);
//
Return true if URL is changed.
bool
ensure_final_url
(
const
std::string final_url);
//
Return true if URL is changed from http to https.
bool
ensure_https
();
//
Return full URL of request, which may have been modified to use CORS proxy.
std::string
get_full_url
();
git_smart_subtransport_stream m_parent;
wasm_http_subtransport* m_subtransport;
//
Not owned, needed for credentials, etc.
http_service m_service;
std::string m_unconverted_url;
int
m_request_index;
wasm_http_response m_response;
};
void
wasm_http_stream_free
(git_smart_subtransport_stream* s);
int
wasm_http_stream_read
(git_smart_subtransport_stream* s,
char
* buffer,
size_t
buffer_size,
size_t
* bytes_read);
int
wasm_http_stream_read_response
(
git_smart_subtransport_stream* s,
char
* buffer,
size_t
buffer_size,
size_t
* bytes_read
);
int
wasm_http_stream_write
(git_smart_subtransport_stream* s,
const
char
* buffer,
size_t
buffer_size);
#
endif
//
EMSCRIPTEN
Back
|
FazBrowse Home
|
New Git URL