Is there a C version of the Network Extensions APIs?
Just asking because some of the Objective-C/Swift objects do not provide useful methods.
e.g. NWEndpoint vs nw_endpoint_t
If you want to get the port using NWEndpoint/NWHostEndpoint, you first need to get a NSString * that is useless and "big" and convert it to an unsigned short.
If you want to get the port using nw_endpoint_t, you just use nw_endpoint_get__port to get the unsigned short.
It's worse of course if you need to get the sockaddr *.
Also with nw_endpoint_t, you can know the type of the endpoint…
I will file an enhancement request about this if needed but the Feedback Assistant website was down, again, when I tried.
Just asking because some of the Objective-C/Swift objects do not provide useful methods.
e.g. NWEndpoint vs nw_endpoint_t
If you want to get the port using NWEndpoint/NWHostEndpoint, you first need to get a NSString * that is useless and "big" and convert it to an unsigned short.
If you want to get the port using nw_endpoint_t, you just use nw_endpoint_get__port to get the unsigned short.
It's worse of course if you need to get the sockaddr *.
Also with nw_endpoint_t, you can know the type of the endpoint…
I will file an enhancement request about this if needed but the Feedback Assistant website was down, again, when I tried.