Hi-

In the C++ API, is there an (easy) way to get the binary encoded message of 
an AnyPointer field? Or a generic field? (If I understand, they're encoded 
the same under the hood.) I don't think anyPointer->getAs<Data>() would 
work, would it?

The background here is that I'm trying to write a generic proxy for 
CapnProto messages using CapnProto RPC. Since I'm not re-compiling the 
proxy itself, it cannot know the possible types for AnyPointer. Since 
messages don't need any schema data to be traversed (though not 
interpreted) correctly, this *should *be possible.

To be more concrete:
interface ProxyChannel {
    send @0 (msg :AnyPointer);
    recv @1 () -> (respMsg :AnyPointer);
}

I'm using :Data instead of :AnyPointer now, but that puts a unnecessary 
burden on the clients.

~John

-- 
You received this message because you are subscribed to the Google Groups 
"Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/capnproto/eb9e7d36-68c6-4830-8e23-77cc14811f71%40googlegroups.com.

Reply via email to