Commit 7298c7fa authored by Kenton Varda's avatar Kenton Varda

More RPC protocol WIP.

parent 41feb767
......@@ -91,11 +91,11 @@ class Response: public Results::Reader {
// is move-only -- once it goes out-of-scope, the underlying message will be freed.
public:
inline Response(typename Results::Reader reader, kj::Own<ResponseHook>&& hook)
inline Response(typename Results::Reader reader, kj::Own<const ResponseHook>&& hook)
: Results::Reader(reader), hook(kj::mv(hook)) {}
private:
kj::Own<ResponseHook> hook;
kj::Own<const ResponseHook> hook;
template <typename, typename>
friend class Request;
......@@ -347,6 +347,7 @@ public:
};
kj::Own<const ClientHook> newBrokenCap(const char* reason);
kj::Own<const ClientHook> newBrokenCap(kj::Exception&& reason);
// Helper function that creates a capability which simply throws exceptions when called.
// =======================================================================================
......
......@@ -494,6 +494,8 @@ public:
: segment(nullptr), data(nullptr), pointers(nullptr), dataSize(0),
pointerCount(0), bit0Offset(0), nestingLimit(0x7fffffff) {}
const void* getLocation() const { return data; }
inline BitCount getDataSectionSize() const { return dataSize; }
inline WirePointerCount getPointerSectionSize() const { return pointerCount; }
inline Data::Reader getDataSectionAsBlob();
......
This diff is collapsed.
......@@ -156,6 +156,9 @@ public:
inline ArrayPtr<T> asPtr() {
return ArrayPtr<T>(ptr, size_);
}
inline ArrayPtr<const T> asPtr() const {
return ArrayPtr<T>(ptr, size_);
}
inline size_t size() const { return size_; }
inline T& operator[](size_t index) const {
......
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