Little Bobby Tales wrote: |
---|
they literally arent, actually, otherwise windows would completely drop the winapi and pick up posix |
Note how I said "BSD sockets."
Winsock isn't based off of POSIX sockets. It's based off of BSD sockets which are not technically part of the POSIX specification. I don't think you understand the difference between the two, which is a problem.
Also, even if they
were based off of POSIX sockets, why would they have to adopt the POSIX standard? Windows' way of doing things is it's own standard. It's large enough that it really doesn't matter what standard that they use and what they don't.
And now that I think of it... Linux uses POSIX features, yet it isn't technically POSIX system. Why is this? By your logic, since it supports POSIX features, it should be 100% compliant with POSIX itself!
actually, it has a lot more baggage than POSIX sockets. this is due to the fact that posix sockets and winsock were created for different reasons |
Winsock's sole purpose of creation was to be a Windows implementation of BSD sockets. It was meant to attract *nix developers to Windows. It was created with a large amount of compatibility in mind.
POSIX sockets are literally just BSD sockets with a few slight alterations, meant to standardize sockets on POSIX-compatible systems.
I don't really know where you're getting your information from, but it says that right on Microsoft's website.
there are more than one kind of raw sockets. have you used sys/inet.h? those are posix sockets (iirc. its some sort of standard). that *is* a light layer over BSD sockets. SFML providesa a great deal more of an abstraction. |
No it's not a light layer over BSD sockets. It's a POSIX system's way of implementing them (well not technically. POSIX sockets are
really a completely different API that was based off of BSD sockets, but for all intents and purposes they're the same).
______________________________________________________________________
S G H wrote: |
---|
@Avilius: Making an asynchronous socket's been a nightmare my first time.
|
It might have been because you were inexperienced with networking in general at that time.
It's like saying "I first learned Clarinet, which was hard. I then picked up Saxophone and it was way easier!"
You've already learned the basics of music theory and how to play a woodwind instrument (not to mention a lot of other things, such as the fingerings with some notes, and with some Saxophone flavors, the same key); I'd sure hope that it's easy to learn!
Also my SFML suggestion isn't for highlevel networking, but for portable lowlevel-ish networking. This allows him to understand how protocols work while being sure the networking code is correct for every system. |
Okay I understand. That's a perfectly valid reason, however, You could do that even without SFML with about twenty minutes of work.
And even if that wasn't the case, why are you even worrying about portability at this stage? I'm not saying that you should go out of your way to use platform-specific functionality whenever possible, but if you're bending over backwards to just to make sure something works on Linux, you're doing it wrong!
Portability should be your last concern while learning a new field in programming!