4 ms·
Title in HN context gave me a flashback to the 90s: Everything you need to know about Winsocks [1] (windows sockets) 1: https://en.wikipedia.org/wiki/Winsock h
by EarthLaunch 6y ago
Title in HN context gave me a flashback to the 90s: Everything you need to know about Winsocks [1] (windows sockets)
1: https://en.wikipedia.org/wiki/Winsock https://en.wikipedia.org/wiki/Winsock
- anta40 6y agoMe too. I thought this post is related to Windows network programming.
- Redheir 6y agoI thought the same thing.
- unnouinceput 6y ago90's? On desktop world this is pretty much still in use due to Windows being king on desktop. And if you master Winsock you can still rack in the big bucks even if you ignore everything else.
- the-dude 6y agoBy doing what exactly?
- quietbritishjim 6y agoWhy not use a wrapper API like ASIO?
- soylentgraham 6y agoWhy not just use the API? :)
- quietbritishjim 6y agoAdvantages: * Using a wrapper lets you use the same API on different platforms. This is not just for programs that are expected to compile and run on multiple platforms (although that is the main reason); it's also for developers who are expected to write programs for multiple platforms. * This potentially allows for a cleaner API, because the native OS one has to be careful about backwards compatibility, whereas wrapper APIs can be more carefree about it, at least initially. In the most extreme case, you can use a totally new library with a freshly-designed API. At this point ASIO has stabilised, but you can see it's substantially different from WinSock (albeit it has the same fundamental concepts, of course). * The underlying OS API generally has to be purely C-based, whereas a wrapper can make use of langauge features, such as C++ features in the case of ASIO. It is sometimes debatable whether it's a benefit to make use of C++ language features! But at least some people would consider it to be. Disadvantages: * As discussed above, job security!
- CapriciousCptl 6y agoBeej's guide still gets updated! I remember it from the early 2000s. https://beej.us/guide/bgnet/html/ https://beej.us/guide/bgnet/html/
- mynegation 6y agoI finally realized that “winsocks” name is a clever pun.
- Scoundreller 6y agoIt didn’t help that the original logo was an orange and white windsock...
- zadkey 6y agoI also immediately thought of winsock.