- 04 Sep, 2015 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
Added method accept() to TwoPartyServer for servicing arbitrary AsyncIoStreams.
-
- 02 Sep, 2015 1 commit
-
-
Kenton Varda authored
Increase arenaSpace to fix 32-bit builds.
-
- 01 Sep, 2015 1 commit
-
-
Philip Quinn authored
-
- 31 Aug, 2015 1 commit
-
-
Kenton Varda authored
Fix bug in JSON encoder that caused each byte of a UTF-8 sequence to be escaped as a separate character.
-
- 30 Aug, 2015 1 commit
-
-
Christopher Jack Turner authored
Added capnp::TwoPartyServer::accept(...) this method allows capnp::TwoPartyServer to service arbitrary kj::AsyncIOStream objects such as those representing two-way pipes (socketpairs).
-
- 14 Aug, 2015 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
- 08 Aug, 2015 1 commit
-
-
Kenton Varda authored
-
- 06 Aug, 2015 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
The library allows for registering special handlers for specific types or fields. This is particluarly useful for overriding the way `Data` is encoded (since many approaches exist) or supporting encodings like EJSON or Q which extend JSON with special types encoded as objects with field names perfixed by dollar signs. Not integrated into build system yet (but builds nicely with Ekam). I think this is going to need to be a separate library, e.g. libcapnp-json, because clearly a lot of Cap'n Proto users don't need it at all. For the moment, this was written for use inside Sandstorm. There is no current need for a decoder, so I have not written that yet and have no immediate plans to do so. But it will be added before any official Cap'n Proto release, certainly. A simple recursive descent parser should be easy...
-
- 03 Aug, 2015 1 commit
-
-
Kenton Varda authored
Fix bug dereferencing nullptr when forwarding a large skip
-
- 02 Aug, 2015 1 commit
-
-
Hunter Morris authored
-
- 31 Jul, 2015 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
Make tests work on mipsel, maybe. Hopefully fixes #204. I don't know since I don't have a mipsel machine.
-
- 29 Jul, 2015 1 commit
-
-
Kenton Varda authored
Example: const data :Data = embed "some-file.dat"; Files are looked up the same way an import would be. You can use embed when Data or Text is expected. You can also use it when a struct type is expected -- the file will be interpreted as a message using standard binary serialization.
-
- 24 Jul, 2015 1 commit
-
-
Kenton Varda authored
Add a way to concatenate lists without losing data when one or more of the lists was written using a newer version of the protocol.
-
- 23 Jul, 2015 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
Fix bug causing exception: "'Disembargo' of type 'senderLoopback' sent to an object that does not point back to the sender." The problem happened when pipelined calls were made on a promised capability, but then that capability turned out to be null. The promise resolving code incorrectly interpreted this as the remote promise having resolved to a local capability (because the "null" stub capability looks local), and so it would send a Disembargo message to flush the pipeline as required. However, the remote end would receive this Disembargo message and find it is addressed to a null capability, not a capability pointing back to the sender. This was treated as a protocol error, causing the receiver to close the connection. The solution is to explicitly identity "null" capabilities so that we can distinguish this case. This change also has the benefit that now when you copy a null capability between messages with foo.setCap(bar.getCap()), the pointer will be set null in the destination, rather than becoming a reference to a local broken capability. Thanks to David Renshaw for narrowing this down.
-
- 22 Jul, 2015 1 commit
-
-
Kenton Varda authored
Also introduce a way to copy a struct or list which applies membranes to all embedded capabilities, since this seems like it will be needed in conjuction with the above.
-
- 17 Jul, 2015 4 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
-
Kenton Varda authored
Update RPC docs for the change to a single bootstrap interface
-
Geoffrey Thomas authored
-
- 12 Jul, 2015 2 commits
-
-
Kenton Varda authored
Update comment: MessageReader::reset() has not existed for a very long time.
-
David Renshaw authored
-
- 08 Jul, 2015 1 commit
-
-
Kenton Varda authored
-
- 03 Jul, 2015 3 commits
-
-
Kenton Varda authored
Workaround nonexistent EPROTO on OpenBSD
-
Steven Dee authored
Fixes #221.
-
Kenton Varda authored
**The problem** The methods MessageReader::initCapTable() and MessageBuilder::getCapTable() always felt rather hacky. initCapTable() in particular feels like something that should be handled by the constructor. However, in practice, the cap table is often initialized based on a table encoded within the message itself. That is, an RPC message contains a "payload" which includes both the application-level message structure and a table of capabilities. The cap table has to be processed first, then initCapTable() is called on the overall message, before the application structure can safely be read. The really weird part about this is that even though the cap table only applies to one branch of the message (the payload), it is set on the *whole* MessageReader. This implies, for example, that it would be impossible to have a message that contains multiple payloads. We haven't had any need for such a thing, but an implemnetation that has such artificial limitations feels very wrong. MessageBuilder has similar issues going in the opposite direction. All of this ugliness potentially gets worse when we introduce "membranes". We want a way to intercept capabilities as they are being read from or written to an RPC payload. Currently, the only plausible way to do that is, again, to apply a transformation to all capabilities in the message. In practice it seems like this would work out OK, but it again feels wrong -- we really want to take a single Reader or Builder and "wrap" it so that transformations are applied on capabilities read/written through it. **The solution** This change fixes the problem by adding a new pointer to each struct/list Reader/Builder that tracks the current cap table. So, now a Reader or Builder for a particular sub-object can be "imbued" with a cap table without affecting any other existing Readers/Builders pointing into the same message. The cap table is inherited by child Readers/Builders obtained through the original one. This approach matches up nicely with membranes, which should make their implementation nice and clean. This change unfortunately means that Readers and Builders are now bigger, possibly with some performance impact.
-
- 28 Jun, 2015 1 commit
-
-
Kenton Varda authored
-
- 26 Jun, 2015 2 commits
-
-
Kenton Varda authored
-
Kenton Varda authored
Allow trailing commas in parenthesized and bracketed lists.
-
- 23 Jun, 2015 3 commits
-
-
Kenton Varda authored
Fix bug where calling a list setter using a list obtained from a similarly-typed getter, but where the underlying pointer was null, would write an incorrectly-typed pointer in the destination (specifically, an empty List(Void)). Now it sets an empty list of the correct type.
-
Kenton Varda authored
-
Kenton Varda authored
Unfortunately, the layout algorithm had a bug which caused incorrect layout when declaring a union whose lowest-ordinal field was of type Void and nested in an inner union. That is: union { a :union { b @0 :Void ... } ... } In this case, all the fields in the struct after the Void field -- including both unions' discriminants -- would end up misplaced. Although they did not end up overlapping (and therefore the incorrect layout "worked"), the result broke schema evolution rules around "retroactive unionization". Unfortunately, we must break compatibility with any protocol that happened to contain the above pattern. Luckily, it's a fairly obscure case. Unluckily, Cap'n Proto's own schema format contains such a pattern. Luckily, the use of this pattern was introduced in v0.6.x and therefore has not been in any release build so far.
-
- 22 Jun, 2015 2 commits
-
-
Drew Fisher authored
And add a test to verify this behavior.
-
Drew Fisher authored
-
- 14 Jun, 2015 1 commit
-
-
Kenton Varda authored
.gitignore should not ignore bootstrap files, which are not build artifacts. Possibly related to #216.
-
- 12 Jun, 2015 1 commit
-
-
Kenton Varda authored
Fix problem with some RealmGateway template helpers
-