3 ms·
When do you need ip addresses but no sockets?
by lionkor 3y ago
When do you need ip addresses but no sockets?
- tialaramex 3y agoSockets are an OS feature (initially on BSD) to make it simple to program with IP on Unix-like systems. They're not crucial to the Network, they're happenstance. Indeed in the early 1990s you'd have found pockets of people who weren't convinced sockets were even the Right Thing™ they wanted some other API to the same network. Same IP addresses, same services, same protocols, different API. So there's no reason the very cheap device would care about sockets. But it does talk to the network, and for that it needs to know about addresses.
- lionkor 3y agoa socket is just a name for that abstraction, call it what you will.
- tialaramex 3y agoIt's a very specific API, you don't need to use that API. QUIC implementations don't tend to have an equivalent for example, there's some of Connection data structure, but no need to give out integer handles if the implementation just lives in a library. It can seem weird today when we're used to sockets everywhere, but that's an arbitrary choice and there's no reason a tiny embedded system would mimic it.