Best library for socket programming

Although there are lots of socket library for socket programming. But in general I try to prefer WS2_32.lib which is present in every IDE. Either you use codeblocks or Visual Studio, WS2_32.lib is the best library that I suggest you to use for socket programming. It is because of it easy use of function. It is already present in the IDE you use.
The question is how you link those libraries and which header file you use for it? In codeblocks  we can just link the library by going to the “linker settings” and then adding “libws2_32.a” file to it. You can see in the figure given as below. It is similar to the WS2_32.lib. And in the Visual Studio we just write the code which goes like this:

and then in common writing the code…..

For Visual Studio :

For Codeblocks:
Now you may be thinking which is the header file that I have to include to start Socket programming. It is <winsock2.h>. This header file must be included for the socket programming. All this stuff is for C++ language. All you need is to learn the language. For every language there are separate techniques.And this one is for C++.

Happy Socket coding…………..:)

Leave a Reply

Your email address will not be published. Required fields are marked *

How to whitelist website on AdBlocker?

How to whitelist website on AdBlocker?

  1. 1 Click on the AdBlock Plus icon on the top right corner of your browser
  2. 2 Click on "Enabled on this site" from the AdBlock Plus option
  3. 3 Refresh the page and start browsing the site
%d bloggers like this: