Are all sockets implemented as per the Berkeley sockets specification in all platforms or languages? What I am trying to understand is; is this the only standard for sockets implementation or there are any other specification depending on the operating systems.

To be specific, I don't want the entire list of socket specs, instead I want to know if there is a single standard for this or the standards aRE platform dependent?

If there are more than one the few names may be helpful.

  • 1
    From the Wikipedia article you just linked: "All modern operating systems implement a version of the Berkeley socket interface. It became the standard interface for applications running in the Internet. Even the Winsock implementation for MS Windows, created by unaffiliated developers, closely follows the standard." Dec 23 '19 at 15:52
  • Windows has an extra set of APIs loosely based on Berkeley sockets.
    – user253751
    Dec 23 '19 at 18:26

No, Berkeley Sockets are not the only networking API.

The Wikipedia article you linked to lists a couple of alternatives. The most notable ones are

  • STREAMS, which appeared in Research Unix 8 and are part of Unix System V Release 4. Operating Systems that are compatible with SVR4 still provide STREAMS-based networking APIs, even if just as a shim layer on top of Berkeley sockets.
  • Filesystem-based networking APIs. Plan9 is a successor to Unix, designed by (some of) the original designers of Unix. Inferno is the successor to Plan9. Both of these have in common that they take the "Everything Is A File" mantra of Unix much further. In Plan9 and Inferno, there is no "networking API" because sockets are just files like any other. Genode, which shares no heritage with Unix / BSD / Plan9 / Inferno, is similar.
  • Object-oriented networking APIs. In some object-oriented OSs, the networking API is based on object-oriented abstractions, not Berkeley "kind-of like a file but not really a file" abstractions.

More generally: there are hundreds of Operating Systems and thousands of languages, it would be statistically unlikely that all of them have settled on the exact same API.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.