- 18 Jun, 2019 1 commit
-
-
Kenton Varda authored
-
- 02 May, 2019 1 commit
-
-
Kenton Varda authored
-
- 19 Apr, 2019 1 commit
-
-
Kenton Varda authored
-
- 18 Apr, 2019 2 commits
-
-
Harris Hancock authored
Previously if the input stream being pumped from encountered an EOF while the other side of the pipe was being pumped elsewhere, we did not fulfill the tryPumpFrom() promise, leaving it hanging.
-
Kenton Varda authored
Previously, FDs could only be sent separately from data, with the underlying implementation actually sending a dummy one-byte message. For Cap'n Proto FD passing, it's better if we can attach the FDs to the RPC message they arrived with, because it avoids the need to pre-negotiate where FD passing is supported: if the sender sends FDs but the recipient doesn't arrange to receive them, the FDs will be discarded and closed automatically by the OS. Whereas, if we are sending separate one-byte messages, the recipient needs to know what to do with those.
-
- 22 Jan, 2019 1 commit
-
-
Kenton Varda authored
This will allow the HTTP server to detect when a client has disconnected and cancel processing the response.
-
- 10 Dec, 2018 1 commit
-
-
Kenton Varda authored
-
- 08 Sep, 2018 1 commit
-
-
Harris Hancock authored
-
- 20 Jun, 2018 1 commit
-
-
Kenton Varda authored
Before this change, if *either* the `from` or the `to` end of the pump threw a DISCONNECTED exception, we'd then try to call `to.disconnect()`. But if the exception had been thrown from `to` in the first place, then this would throw again, this time complaining about a previous write not having completed. But the whole point was always to propagate errors from the *receiving* end to the sending end. An error on the sending end should just propagate up the stack.
-
- 12 Jun, 2018 1 commit
-
-
Harris Hancock authored
Reading an unbounded amount of data from a stream is a potential DoS vector. To manage this risk, readAllText() and readAllBytes() now accept a `limit` parameter. For source backwards-compatibility, this limit defaults to kj::maxValue.
-
- 07 Jun, 2018 1 commit
-
-
Harris Hancock authored
-
- 24 Apr, 2018 1 commit
-
-
Kenton Varda authored
-
- 21 Apr, 2018 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
- 18 Apr, 2018 3 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
This lets you construct an AsyncInputStream / AsyncOutputStream pair that operates entirely within userspace, rather than pushing through a kernel-level pipe. This is far more efficient, avoiding system calls and reducing copies. The pipe does not buffer at all. Instead, it waits for both a read() and a write() call to be active at the same time, and then it fulfills one with the other. This implementation also optimizes pumps. Imagine the situation: you create a pipe; you call pumpTo() on the write end to pump it to some other; then you write to the write end of the pipe. In this case, the write will *directly* call the target stream to which the pipe is being pumped. Hence, adding daisy-chained pipes on top of a final output stream does not incur additional copies of the data. Similarly, tryPumpFrom() is optimized on the read end.
-
- 23 Feb, 2018 1 commit
-
-
Kenton Varda authored
-
- 26 Jan, 2018 1 commit
-
-
Kenton Varda authored
Unfortunately TCP does not always distinguish between dirty connection failure and clean connection shutdown. In practice, though, "Premature EOF" errors on streams basically always appear to be due to disconnects (including when the peer crashes).
-
- 20 Nov, 2017 1 commit
-
-
Davide Italiano authored
-
- 23 Sep, 2017 1 commit
-
-
Kenton Varda authored
-
- 22 Sep, 2017 1 commit
-
-
Kenton Varda authored
This un-breaks code which previously relied upon an implicit cast from AutoCloseFd to int to call the non-ownership-passing versions of the methods.
-
- 21 Sep, 2017 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
This allows a lot of nice design patterns, and might later the the basis for capnp 3-party handoff within a machine.
-
- 15 Sep, 2017 3 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
-
- 14 Sep, 2017 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
- 12 Sep, 2017 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
- 02 Feb, 2017 1 commit
-
-
Harris Hancock authored
-
- 24 Jan, 2017 3 commits
-
-
Harris Hancock authored
-
Kenton Varda authored
- AsyncInputStream::tryGetLength() can report the amount of data the stream will produce. Useful for implementing HTTP Content-Length header. - AsyncInputStream::pumpTo() copies data from an input stream to an output stream, using double-dispatch to find an optimal approach.
-
Kenton Varda authored
-
- 22 Jan, 2017 2 commits
-
-
Kenton Varda authored
Re-introduce async-io.c++ containing just the default implementations of methods on the abstract interfaces.
-
Kenton Varda authored
Rename async-io.c++ to async-io-unix.c++, in preparation for factoring out common bits from async-io-win32.c++.
-
- 01 Dec, 2016 1 commit
-
-
Kenton Varda authored
-
- 12 Nov, 2016 1 commit
-
-
Kenton Varda authored
The implementation used by AsyncStreamFd was simply calling the general tryRead(), so why not?
-
- 07 Nov, 2016 1 commit
-
-
Kenton Varda authored
-