Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
capnproto
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
capnproto
Commits
620ba371
Commit
620ba371
authored
Aug 26, 2018
by
Kenton Varda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove deprecated overload of newHttpClient() per TODO(soon).
parent
a5e1d78f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
18 deletions
+12
-18
http-test.c++
c++/src/kj/compat/http-test.c++
+12
-4
http.h
c++/src/kj/compat/http.h
+0
-14
No files found.
c++/src/kj/compat/http-test.c++
View file @
620ba371
...
...
@@ -1910,8 +1910,10 @@ KJ_TEST("HttpClient WebSocket handshake") {
auto
headerTable
=
tableBuilder
.
build
();
FakeEntropySource
entropySource
;
HttpClientSettings
clientSettings
;
clientSettings
.
entropySource
=
entropySource
;
auto
client
=
newHttpClient
(
*
headerTable
,
*
pipe
.
ends
[
0
],
entropySource
);
auto
client
=
newHttpClient
(
*
headerTable
,
*
pipe
.
ends
[
0
],
clientSettings
);
testWebSocketClient
(
waitScope
,
*
headerTable
,
hMyHeader
,
*
client
);
...
...
@@ -1936,8 +1938,10 @@ KJ_TEST("HttpClient WebSocket error") {
auto
headerTable
=
tableBuilder
.
build
();
FakeEntropySource
entropySource
;
HttpClientSettings
clientSettings
;
clientSettings
.
entropySource
=
entropySource
;
auto
client
=
newHttpClient
(
*
headerTable
,
*
pipe
.
ends
[
0
],
entropySource
);
auto
client
=
newHttpClient
(
*
headerTable
,
*
pipe
.
ends
[
0
],
clientSettings
);
kj
::
HttpHeaders
headers
(
*
headerTable
);
headers
.
set
(
hMyHeader
,
"foo"
);
...
...
@@ -2455,7 +2459,9 @@ KJ_TEST("newHttpService from HttpClient WebSockets") {
{
HttpHeaderTable
table
;
FakeEntropySource
entropySource
;
auto
backClient
=
newHttpClient
(
table
,
*
backPipe
.
ends
[
0
],
entropySource
);
HttpClientSettings
clientSettings
;
clientSettings
.
entropySource
=
entropySource
;
auto
backClient
=
newHttpClient
(
table
,
*
backPipe
.
ends
[
0
],
clientSettings
);
auto
frontService
=
newHttpService
(
*
backClient
);
HttpServer
frontServer
(
timer
,
table
,
*
frontService
);
auto
listenTask
=
frontServer
.
listenHttp
(
kj
::
mv
(
frontPipe
.
ends
[
1
]));
...
...
@@ -2494,7 +2500,9 @@ KJ_TEST("newHttpService from HttpClient WebSockets disconnect") {
{
HttpHeaderTable
table
;
FakeEntropySource
entropySource
;
auto
backClient
=
newHttpClient
(
table
,
*
backPipe
.
ends
[
0
],
entropySource
);
HttpClientSettings
clientSettings
;
clientSettings
.
entropySource
=
entropySource
;
auto
backClient
=
newHttpClient
(
table
,
*
backPipe
.
ends
[
0
],
clientSettings
);
auto
frontService
=
newHttpService
(
*
backClient
);
HttpServer
frontServer
(
timer
,
table
,
*
frontService
);
auto
listenTask
=
frontServer
.
listenHttp
(
kj
::
mv
(
frontPipe
.
ends
[
1
]));
...
...
c++/src/kj/compat/http.h
View file @
620ba371
...
...
@@ -637,12 +637,6 @@ kj::Own<HttpClient> newHttpClient(HttpHeaderTable& responseHeaderTable, kj::Asyn
// subsequent requests will fail. If a response takes a long time, it blocks subsequent responses.
// If a WebSocket is opened successfully, all subsequent requests fail.
kj
::
Own
<
HttpClient
>
newHttpClient
(
HttpHeaderTable
&
responseHeaderTable
,
kj
::
AsyncIoStream
&
stream
,
kj
::
Maybe
<
EntropySource
&>
entropySource
)
KJ_DEPRECATED
(
"use HttpClientSettings"
);
// Temporary for backwards-compatibilty.
// TODO(soon): Remove this before next release.
kj
::
Own
<
HttpClient
>
newHttpClient
(
HttpService
&
service
);
kj
::
Own
<
HttpService
>
newHttpService
(
HttpClient
&
client
);
// Adapts an HttpClient to an HttpService and vice versa.
...
...
@@ -802,12 +796,4 @@ inline void HttpHeaders::forEach(Func&& func) const {
}
}
inline
kj
::
Own
<
HttpClient
>
newHttpClient
(
HttpHeaderTable
&
responseHeaderTable
,
kj
::
AsyncIoStream
&
stream
,
kj
::
Maybe
<
EntropySource
&>
entropySource
)
{
HttpClientSettings
settings
;
settings
.
entropySource
=
entropySource
;
return
newHttpClient
(
responseHeaderTable
,
stream
,
kj
::
mv
(
settings
));
}
}
// namespace kj
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