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
bacf9744
Commit
bacf9744
authored
Sep 26, 2017
by
Kenton Varda
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://github.com/capnproto/capnproto
parents
bb8cbe74
ef130da3
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
21 additions
and
4 deletions
+21
-4
async-io.c++
c++/src/kj/async-io.c++
+5
-0
async-io.h
c++/src/kj/async-io.h
+4
-1
http-test.c++
c++/src/kj/compat/http-test.c++
+10
-2
http.h
c++/src/kj/compat/http.h
+2
-1
No files found.
c++/src/kj/async-io.c++
View file @
bacf9744
...
@@ -241,6 +241,11 @@ Own<DatagramPort> LowLevelAsyncIoProvider::wrapDatagramSocketFd(
...
@@ -241,6 +241,11 @@ Own<DatagramPort> LowLevelAsyncIoProvider::wrapDatagramSocketFd(
Fd
fd
,
LowLevelAsyncIoProvider
::
NetworkFilter
&
filter
,
uint
flags
)
{
Fd
fd
,
LowLevelAsyncIoProvider
::
NetworkFilter
&
filter
,
uint
flags
)
{
KJ_UNIMPLEMENTED
(
"Datagram sockets not implemented."
);
KJ_UNIMPLEMENTED
(
"Datagram sockets not implemented."
);
}
}
#if !_WIN32
Own
<
AsyncCapabilityStream
>
LowLevelAsyncIoProvider
::
wrapUnixSocketFd
(
Fd
fd
,
uint
flags
)
{
KJ_UNIMPLEMENTED
(
"Unix socket with FD passing not implemented."
);
}
#endif
CapabilityPipe
AsyncIoProvider
::
newCapabilityPipe
()
{
CapabilityPipe
AsyncIoProvider
::
newCapabilityPipe
()
{
KJ_UNIMPLEMENTED
(
"Capability pipes not implemented."
);
KJ_UNIMPLEMENTED
(
"Capability pipes not implemented."
);
}
}
...
...
c++/src/kj/async-io.h
View file @
bacf9744
...
@@ -574,9 +574,12 @@ public:
...
@@ -574,9 +574,12 @@ public:
// `flags` is a bitwise-OR of the values of the `Flags` enum.
// `flags` is a bitwise-OR of the values of the `Flags` enum.
#if !_WIN32
#if !_WIN32
virtual
Own
<
AsyncCapabilityStream
>
wrapUnixSocketFd
(
Fd
fd
,
uint
flags
=
0
)
=
0
;
virtual
Own
<
AsyncCapabilityStream
>
wrapUnixSocketFd
(
Fd
fd
,
uint
flags
=
0
);
// Like wrapSocketFd() but also support capability passing via SCM_RIGHTS. The socket must be
// Like wrapSocketFd() but also support capability passing via SCM_RIGHTS. The socket must be
// a Unix domain socket.
// a Unix domain socket.
//
// The default implementation throws UNIMPLEMENTED, for backwards-compatibility with
// LowLevelAsyncIoProvider implementations written before this method was added.
#endif
#endif
virtual
Promise
<
Own
<
AsyncIoStream
>>
wrapConnectingSocketFd
(
virtual
Promise
<
Own
<
AsyncIoStream
>>
wrapConnectingSocketFd
(
...
...
c++/src/kj/compat/http-test.c++
View file @
bacf9744
...
@@ -2601,8 +2601,16 @@ KJ_TEST("HttpClient connection management") {
...
@@ -2601,8 +2601,16 @@ KJ_TEST("HttpClient connection management") {
.
wait
(
io
.
waitScope
).
body
->
readAllBytes
().
wait
(
io
.
waitScope
);
.
wait
(
io
.
waitScope
).
body
->
readAllBytes
().
wait
(
io
.
waitScope
);
KJ_EXPECT
(
count
==
0
);
KJ_EXPECT
(
count
==
0
);
#if !_WIN32 // TODO(soon): Figure out why this doesn't work on Windows. Probably a bug in
#if __linux__
// Win32IocpEventPort::poll().
// TODO(soon): Figure out why this doesn't work on Windows and is flakey on Mac. My guess is that
// the closing of the TCP connection propagates synchronously on Linux so that by the time we
// poll() the EventPort it reports the client end of the connection has reached EOF, whereas on
// Mac and Windows this propagation probably involves some concurrent process which may or may
// not complete before we poll(). A solution in this case would be to use a dummy in-memory
// ConnectionReceiver that returns in-memory pipes (see UnbufferedPipe earlier in this file),
// so that we don't rely on any non-local behavior. Another solution would be to pause for
// a short time, maybe.
// If the server times out the connection, we figure it out on the client.
// If the server times out the connection, we figure it out on the client.
doRequest
().
wait
(
io
.
waitScope
);
doRequest
().
wait
(
io
.
waitScope
);
KJ_EXPECT
(
count
==
1
);
KJ_EXPECT
(
count
==
1
);
...
...
c++/src/kj/compat/http.h
View file @
bacf9744
...
@@ -89,7 +89,8 @@ namespace kj {
...
@@ -89,7 +89,8 @@ namespace kj {
MACRO(upgrade, "Upgrade") \
MACRO(upgrade, "Upgrade") \
MACRO(websocketKey, "Sec-WebSocket-Key") \
MACRO(websocketKey, "Sec-WebSocket-Key") \
MACRO(websocketVersion, "Sec-WebSocket-Version") \
MACRO(websocketVersion, "Sec-WebSocket-Version") \
MACRO(websocketAccept, "Sec-WebSocket-Accept")
MACRO(websocketAccept, "Sec-WebSocket-Accept") \
MACRO(websocketExtensions, "Sec-WebSocket-Extensions")
enum
class
HttpMethod
{
enum
class
HttpMethod
{
// Enum of known HTTP methods.
// Enum of known HTTP methods.
...
...
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