Commit dbac82e8 authored by Kenton Varda's avatar Kenton Varda

Provide a way to get the ClientHook out of a Capability::Client, needed by…

Provide a way to get the ClientHook out of a Capability::Client, needed by third-party RPC/storage/etc systems.
parent 28ce8f3d
...@@ -226,6 +226,7 @@ private: ...@@ -226,6 +226,7 @@ private:
template <typename, Kind> template <typename, Kind>
friend struct List; friend struct List;
friend class _::CapabilityServerSetBase; friend class _::CapabilityServerSetBase;
friend class ClientHook;
}; };
// ======================================================================================= // =======================================================================================
...@@ -511,6 +512,8 @@ public: ...@@ -511,6 +512,8 @@ public:
// If this is a local capability created through `capServerSet`, return the underlying Server. // If this is a local capability created through `capServerSet`, return the underlying Server.
// Otherwise, return nullptr. Default implementation (which everyone except LocalClient should // Otherwise, return nullptr. Default implementation (which everyone except LocalClient should
// use) always returns nullptr. // use) always returns nullptr.
static kj::Own<ClientHook> from(Capability::Client client) { return kj::mv(client.hook); }
}; };
class CallContextHook { class CallContextHook {
......
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