Is there a way to create non-os dependent sockets in c++ and if so how would I go about doing it? Or is there something better to use than sockets? just curious...
Ultimately, you get networking by asking the OS nicely. So the short answer is no. A socket is inherently dependent on the OS.
The longer answer is, what's your use-case? If you mean "can I write some code using sockets in C++ that will then compile on Windows and also on Linux" then yes, you can use a cross-platform library.
Is your upcoming project actually going to be compiled and run on separate platforms? A common source of problems in programming is making things much harder than they need to be in case of things that end up never happening.
I found that the difference between windows and unix sockets was just one or 2 very small things, so we fixed it with #ifdef flags. The function names and structures and all used to be virtually identical... not sure if that is still true in .net though. That was back in winsock days.
you can probably also find a port of the unix one that compiles on windows. Like, patch in Cygwin?
I'm with Repeater on this. It's not specifically a sockets library you need. You want a good comms library. And ZeroMQ is excellent at this sort of thing. It's cross platform and fast.
You will need to take the time to look at comms from their perspective, a paradigm shift. But once you get it, it's worth it.