Closed jiangxuelei closed 5 years ago
We probably want to expose context object similar to how @ThriftHeader
is used. The API for this is tricky since the context is inherently transport specific.
For example, address could be done like this:
@ThriftMethod
void test(@ThriftContext("clientAddress") HostAndPort address);
I see a few options for the type of the context object:
HostAndPort
which is transport specific. The user is required to pick the right type for the bound transport. (probably fine since we only have one real transport type)String
for everything. Has obvious downsides for complex objects (like TLS information).String
.Thank for reply. Version 1.18 can solve this problem? @electrum
No, it’s not implemented yet.
I think ServerInvokeRequest should be extended. For example, add a ChannelHandlerContext field?