3 ms·
Raw sockets have been discouraged in iOS years ago. It doesn't do things like waking up the radio, activating the on-demand VPN; it performs poorly when the dev
by kccqzy 8y ago
Raw sockets have been discouraged in iOS years ago. It doesn't do things like waking up the radio, activating the on-demand VPN; it performs poorly when the device is multihomed; and from the developer's perspective there is a lot more code that needs to be written to support simple things like supporting both IPv4 and IPv6 (with happy eyeballs etc). The writing has been on the wall for years. I will not be surprised if a few years down the road Apple completely removes the sockets API from iOS (though I'd be surprised if they do it on macOS). I'd say good riddance to this outdated API. Your traditional desktop and laptops can continue to use this legacy API for your traditional and cross-platform apps, but iOS as a mostly consumption platform has no need for it. Personally I'm glad that Apple is using the closed nature of the iOS platform to delete legacy baggage and experiment with newer saner APIs that meet the needs of the twenty first century.
I'd also say there's very little reason as a typical developer to write socket code; just use a library provided by the platform or your language. When's the last time you used the raw sockets API?
- saagarjha 8y agoThere are certain things that the raw sockets API allows for that the standard CoreFoundation/Foundation API doesn't. It's pretty rare, but there are some legitimate use cases where this can be necessary.
- eps 8y ago> Raw sockets This is an established term for IP-level sockets, of SOCK_RAW protocol type. Probably not what you meant. http://man7.org/linux/man-pages/man7/raw.7.html http://man7.org/linux/man-pages/man7/raw.7.html
- kccqzy 8y agoYes I mean using the sockets API instead of a higher level API.