I mean, yeah there is documentation in MSDN for each function, but for
the life of me I don't understand why there are two functions that
seem to be doing the same exact thing?
I inherited some winsock code in which the socket connection is made
using connect() but everything else thereafter is handled using WSAxxx
functions. Does that spell trouble?
If not, then why have WSAConnect() at all?
What is the *conceptual* difference between connect() and
WSAConnect() ?
Thanks,
Chris
> [...]
> What is the *conceptual* difference between connect() and
> WSAConnect() ?
WSAConnect() can do more.
Generally speaking, Winsock mirrors the BSD sockets API, providing all of
the same functions and functionality BSD sockets has (mostly). Then,
where additional functionality is wanted, there are either new versions of
the BSD functions (named by changing the first letter in the name to
upper-case and prepending "WSA"), or functions that are simply entirely
new to Winsock (named with the same convention, except of course there's
no corresponding BSD function).
If you don't need the extra parameters in WSAConnect(), calling connect()
is fine.
Pete