


To intialize the Winsock.DLL we will call the WSAStartup function. If you do not, all functions will fail, and return the WSAENOTINITIALIZED error. Overall version two has less bugs and can handle more utilities.īefore you can you call any Winsock function you must initialize the Winsock.DLL. Winsock version one has some bugs that are fixed in version two. As mentioned above IPv6 is only available in Winsock version two. The differences between Winsock versions one and two. UDP does not require a connection and this protocol is typically used in gaming. The difference between TCP and UDP is that TCP requires a connection, it makes sure that all information sent is retrieved.
#VB6 WINSOCK API HOW TO#
The coding displayed in this FAQ is an example on how to connect to a server using the TCP protocol. Winsock does provide features to handle both versions of IP but IPv6 is only available in Winsock 2. The difference between the two is the way the IP address appears.

There are two current versions of IP, IPv4 and IPv6. Several networks run using an internet protocol or IP for short. Having more control over what your application can do is always in the best interests of the user.Ī socket is a handle to a low-level transport provider. Winsock API provides you the programmer with the power to accomplish anything. Programming with the Winsock control is easeir to do by far, but using Winsock API enables you to have more control.
