xquic
xquic copied to clipboard
[Feature]: Unify the connection related interfaces.
Before request a new feature
- [X] I have searched the issues of this repository and believe that this is not a duplicate.
Describe the feature you'd like supported
The connection related interfaces are inconsistent: some use xqc_cid_t as user handler, some use xqc_connection_t*.
As xqc_cid_t is a complex type and must find the hash map to get the real connection context, using it as user handler is weird. Is there any reason to design like this?
IMO, using xqc_connection_t* as the user handler is the most convenient and most efficient way.
Describe alternatives you've considered
use xqc_connection_t* to replace all xqc_cid_t, and provide another interface const xqc_cid_t* xqc_conn_cid(xqc_connection_t*conn) to get the cid.
Additional context
No response