- 21 Jan, 2020 1 commit
-
-
Kenton Varda authored
Add test for FdObserver(..., flags=0)::whenWriteDisconnected() support
-
- 18 Jan, 2020 1 commit
-
-
Guillaume Papin authored
Fixes #924
-
- 13 Dec, 2019 1 commit
-
-
Kenton Varda authored
remove kj-test from CAPNP_LIBRARIES
-
- 10 Dec, 2019 2 commits
-
-
Kenton Varda authored
Make newPromisedStream() generally available
-
Harris Hancock authored
This moves Promise{Io,Output}Stream from http.c++ to PromisedAsync{Io,Output}Stream in async-io.c++ and exposes them via newPromisedStream() so other code can use them. No substantive code changes, though I changed a couple of the `public` access specifiers to `private`.
-
- 06 Dec, 2019 3 commits
-
-
Kenton Varda authored
Implement fibers
-
Kenton Varda authored
Revert "Override Content-Length and Transfer-Encoding in http-over-capnp."
-
Kenton Varda authored
This reverts commit 0123e171. This wasn't the right place to solve this problem. The same problem applies when calling an HttpService directly, or using an HttpClient that wraps an in-process HttpService. Applications that struggle with this need to find a better solution.
-
- 05 Dec, 2019 4 commits
-
-
Kenton Varda authored
While swapcontext() exists on Cygwin, it seems that throwing an exception in a stack other than the main stack leads to a hang. But the Win32 fiber API seems to work fine.
-
Kenton Varda authored
It was so easy that it compiled on the first try and almost totally worked... only thing I missed was calling switchToMain() explicitly at the end of the fiber main func.
-
Kenton Varda authored
Fibers allow code to be written in a synchronous / blocking style while running inside the KJ event loop, by executing the code on an alternate call stack and switching back to the main stack whenever it waits. We introduce a new function, `kj::startFiber(stackSize, func)`. `func` is executed on the fiber stack. It is passed as its parameter a `WaitScope&`, which can then be passed into the `.wait()` method of any promise in order to wait on the promise in a blocking style. `startFiber()` returns a promise for the eventual value returned by `func()` (much as `evalLater()` and friends do). This commit implements fibers on Unix via ucontext_t. Windows will come next (and will probably be easier...).
-
faywong authored
as kj/test.c++ contains "KJ_MAIN(kj::TestRunner);", this will generate the main entry for a process, so as to hidden the one defined in the main program(which is maybe the most common use case of CAPNP_LIBRARIES)
-
- 04 Dec, 2019 1 commit
-
-
Kenton Varda authored
Instead of making `Promise` friend everything that needs to construct a `Promise<T>` from an `Own<PromiseNode>` or vice versa, let's just friend `PromiseNode` itself -- which is already a "private" class by virtue of being in the `_` namespace -- and let it provide some static methods to do the conversions.
-
- 27 Nov, 2019 2 commits
-
-
Kenton Varda authored
Override Content-Length and Transfer-Encoding in http-over-capnp.
-
Kenton Varda authored
Some applications expect to be able to inspect these headers in order to learn about the properties of the entity-body. Currently, over RPC, the sender could send arbitrary header values that have nothing to do with the actual body. Instead, let's just overwrite them to match.
-
- 15 Nov, 2019 1 commit
-
-
Kenton Varda authored
Fix RPC loopback bootstrap().
-
- 14 Nov, 2019 1 commit
-
-
Kenton Varda authored
When VatNetwork::connect() returns nullptr, it means that the caller is trying to connect to itself. rpc-test.c++ failed to test this in two ways: - The test VatNetwork's connect() never returned null. - There was no test case for loopback connect. As a result, the code to handle loopback in rpc.c++ had bitrotted. It failed to handle the new bootstrap mechanism introduced in v0.5, and instead only implemented the restorer mechanism from 0.4.
-
- 11 Nov, 2019 4 commits
-
-
Kenton Varda authored
Update tls-test for BoringSSL changes.
-
Kenton Varda authored
tls-test: Update error message to match new boringssl behavior
-
Kenton Varda authored
Note that I only care about supporting BoringSSL at master since BoringSSL does not do versioned releases.
-
Joe Lee authored
Introduced in 58d56f4c5 ("Enable TLS 1.3 by default").
-
- 08 Nov, 2019 1 commit
-
-
Kenton Varda authored
Add getsockname() to ConnectionReceiver.
-
- 07 Nov, 2019 1 commit
-
-
Kenton Varda authored
This is a no-brainer given AsyncIoStream has getsockopt() and getsockname(), whereas ConnectionReceiver has only getsockopt().
-
- 01 Nov, 2019 1 commit
-
-
Kenton Varda authored
Make HttpClient adapter preserve exception behavior
-
- 31 Oct, 2019 1 commit
-
-
Joe Lee authored
Ideally, the HttpClient/HttpServer adapters should maintain the invariant that the behavior of a given client is the same as the behavior of newHttpClient(newHttpService(client)). Prior to this change, the HttpClient wrapper lazily called request(), so a client whose request() eagerly threw an exception could produce a different exception when called directly versus when wrapped -- the laziness allowed additional code to run. This was particularly evident when making a request with a body, since code using a wrapped client would be able to set up a subsequent BlockedWrite, eventually resulting in a "read end of pipe was aborted" exception instead of the actual exception. This change makes HttpClientAdapter::request() execute the wrapped request() eagerly. (Note that it partially undoes 90d48343... Hopefully, it preserves the desired behavior added there.)
-
- 28 Oct, 2019 4 commits
-
-
Kenton Varda authored
Detect and report when a HashMap suffers from excessive collisions.
-
Kenton Varda authored
Fix failures in http-over-capnp-test.
-
Kenton Varda authored
`task` needs to be the last member of ServerRequestContextImpl, because when we construct it, we call `service.request()`, which may call back to send() or acceptWebSocket(), which require `replyTask` to be initialized.
-
Kenton Varda authored
And fix a bug detected by this.
-
- 23 Oct, 2019 1 commit
-
-
Kenton Varda authored
Various bug fixes
-
- 22 Oct, 2019 4 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
The RPC system itself can sometimes call `releaseParams()` redundantly after the application has already called it. So, it's important that it be idempotent.
-
Kenton Varda authored
-
Kenton Varda authored
-
- 15 Oct, 2019 2 commits
-
-
Kenton Varda authored
Add std-iterator.h to build files
-
Vitali Lovich authored
-
- 14 Oct, 2019 4 commits
-
-
Kenton Varda authored
Suppress MSVC warnings in headers files
-
Kenton Varda authored
Add compat/std-iterator.h
-
Vitali Lovich authored
Allow including a header to obtain the iterator traits instead of needing to carefully define a slightly more obscure macro that someone might be tempted to define globally.
-
Vitali Lovich authored
For Visual Studio we have to wrap the headers with push/pop pragmas at the top and bottom of the file. Define common macros for suppress/unsuppress KJ & the appropriate macros for CAPNP begin/end header wrappers. Because there's a chicken egg problem the KJ_BEGIN_HEADER/CAPNP_BEGIN_HEADER macros are placed below all includes to ensure that the appropriate common.h file has been sourced.
-