maskit commented on code in PR #9482:
URL: https://github.com/apache/trafficserver/pull/9482#discussion_r1253300095


##########
iocore/net/I_NetVConnection.h:
##########
@@ -857,7 +857,20 @@ class NetVConnection : public VConnection, public 
PluginUserArgs<TS_USER_ARGS_VC
   bool has_proxy_protocol(IOBufferReader *);
   bool has_proxy_protocol(char *, int64_t *);
 
+  template <typename S> S *get_service() const;
+

Review Comment:
   > Something needs to bind the enum to the actual concrete type - 
intrinsically that requires knowing about both the enum values and the concrete 
classes.
   
   Yes, I understand it. With dynamic_cast, such thing did not exist at all. 
But now with the enum, something has to know the both. The enum is already a 
compromise for better performance, and I can live with the helper functions. I 
don't like to make code cryptic.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to