Commit ae815524 authored by Kenton Varda's avatar Kenton Varda

Merge branch 'master' of github.com:kentonv/capnproto

parents f7a9c94b da5a1f4b
......@@ -172,11 +172,10 @@ public:
CapnpcCppMain(kj::ProcessContext& context): context(context) {}
kj::MainFunc getMain() {
return kj::MainBuilder(context, "Cap'n Proto loopback plugin version " VERSION,
"This is a Cap'n Proto compiler plugin which \"de-compiles\" the schema back into "
"Cap'n Proto schema language format, with comments showing the offsets chosen by the "
"compiler. This is meant to be run using the Cap'n Proto compiler, e.g.:\n"
" capnp compile -ocapnp foo.capnp")
return kj::MainBuilder(context, "Cap'n Proto C++ plugin version " VERSION,
"This is a Cap'n Proto compiler plugin which generates C++ code. "
"It is meant to be run using the Cap'n Proto compiler, e.g.:\n"
" capnp compile -oc++ foo.capnp")
.callAfterParsing(KJ_BIND_METHOD(*this, run))
.build();
}
......
......@@ -140,7 +140,7 @@ class EzRpcServer {
// The server counterpart to `EzRpcClient`. See `EzRpcClient` for an example.
public:
explicit EzRpcServer(kj::StringPtr bindAddress, uint deafultPort = 0);
explicit EzRpcServer(kj::StringPtr bindAddress, uint defaultPort = 0);
// Construct a new `EzRpcServer` that binds to the given address. An address of "*" means to
// bind to all local addresses.
//
......@@ -169,7 +169,7 @@ public:
// Export a capability publicly under the given name, so that clients can import it.
//
// Keep in mind that you can implicitly convert `kj::Own<MyType::Server>&&` to
// `Capability::Client`, so it's typicall to pass something like
// `Capability::Client`, so it's typical to pass something like
// `kj::heap<MyImplementation>(<constructor params>)` as the second parameter.
kj::Promise<uint> getPort();
......
......@@ -265,8 +265,6 @@ private:
// =======================================================================================
class RpcConnectionState final: public kj::TaskSet::ErrorHandler, public kj::Refcounted {
class PromisedAnswerClient;
public:
RpcConnectionState(kj::Maybe<SturdyRefRestorerBase&> restorer,
kj::Own<VatNetworkBase::Connection>&& connectionParam,
......
......@@ -420,21 +420,19 @@ struct Finish {
# Message type sent from the caller to the callee to indicate:
# 1) The questionId will no longer be used in any messages sent by the callee (no further
# pipelined requests).
# 2) Any capabilities in the results other than the ones listed below should be implicitly
# released.
# 3) If the call has not returned yet, the caller no longer cares about the result. If nothing
# else cares about the result either (e.g. there are to other outstanding calls pipelined on
# 2) If the call has not returned yet, the caller no longer cares about the result. If nothing
# else cares about the result either (e.g. there are no other outstanding calls pipelined on
# the result of this one) then the callee may wish to immediately cancel the operation and
# send back a Return message with "canceled" set. However, implementations are not required
# to support premature cancellation -- instead, the implementation may wait until the call
# actually completes and send a normal `Return` message.
#
# TODO(someday): Should we separate (1) and (2)? It would be possible and useful to notify the
# server that it doesn't need to keep around the response to service pipeline requests even
# though the caller still wants to receive it / hasn't yet finished processing it. It could
# also be useful to notify the server that it need not marshal the results because the caller
# doesn't want them anyway, even if the caller is still sending pipelined calls, although this
# seems less useful (just saving some bytes on the wire).
# TODO(someday): Should we separate (1) and implicitly releasing result capabilities? It would be
# possible and useful to notify the server that it doesn't need to keep around the response to
# service pipeline requests even though the caller still wants to receive it / hasn't yet
# finished processing it. It could also be useful to notify the server that it need not marshal
# the results because the caller doesn't want them anyway, even if the caller is still sending
# pipelined calls, although this seems less useful (just saving some bytes on the wire).
questionId @0 :QuestionId;
# ID of the call whose result is to be released.
......
......@@ -126,11 +126,11 @@ char* fill(char* __restrict__ target, const StringTree& first, Rest&&... rest) {
template <typename T> constexpr bool isStringTree() { return false; }
template <> constexpr bool isStringTree<StringTree>() { return true; }
inline StringTree&& toStringTreeOrCharSequnece(StringTree&& tree) { return kj::mv(tree); }
inline StringTree toStringTreeOrCharSequnece(String&& str) { return StringTree(kj::mv(str)); }
inline StringTree&& toStringTreeOrCharSequence(StringTree&& tree) { return kj::mv(tree); }
inline StringTree toStringTreeOrCharSequence(String&& str) { return StringTree(kj::mv(str)); }
template <typename T>
inline auto toStringTreeOrCharSequnece(T&& value)
inline auto toStringTreeOrCharSequence(T&& value)
-> decltype(toCharSequence(kj::fwd<T>(value))) {
static_assert(!isStringTree<Decay<T>>(),
"When passing a StringTree into kj::strTree(), either pass it by rvalue "
......@@ -202,7 +202,7 @@ StringTree StringTree::concat(Params&&... params) {
template <typename... Params>
StringTree strTree(Params&&... params) {
return StringTree::concat(_::toStringTreeOrCharSequnece(kj::fwd<Params>(params))...);
return StringTree::concat(_::toStringTreeOrCharSequence(kj::fwd<Params>(params))...);
}
} // namespace kj
......
......@@ -23,6 +23,7 @@ project's documentation for details.
* [C](https://github.com/jmckaskill/c-capnproto) by [@jmckaskill](https://github.com/jmckaskill)
* [Go](https://github.com/glycerine/go-capnproto) by [@glycerine](https://github.com/glycerine) (originally by [@jmckaskill](https://github.com/jmckaskill))
* [Java](https://github.com/dwrensha/capnproto-java/) by [@dwrensha](https://github.com/dwrensha)
* [Javascript](https://github.com/jscheid/capnproto-js) by [@jscheid](https://github.com/jscheid)
* [Lua](https://github.com/cloudflare/lua-capnproto) by [CloudFlare](http://www.cloudflare.com/) / [@calio](https://github.com/calio)
* [OCaml](https://github.com/pelzlpj/capnp-ocaml) by [@pelzlpj](https://github.com/pelzlpj)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment