Networking in C / C ++?

I am a beginner C ++ programmer. In C #, I used the System.Net.Sockets.Socket class representing a network socket to create / connect a server. How can I do the same in C / C ++? Are there such classes?

+2


source to share


5 answers


Windows has a library called winsock.dll.

On Unix, you can use unix sockets

Then, theres expand the sockets



beej's manual for internet sockets

windows sockets

increase the network

+7


source


I would recommend reading the beej guide for Network Socket programming . This is a really good source full of good explanations.



+1


source


Sockets are not a fundamental part of C or C ++. If you're on Windows, start with Winsock .

0


source


I did a bit of work with libcurl, this question has tons of answers:

Best C / C ++ Networking Library

... OK, to be fair, libcurl does not work directly with sockets, so it might not be what you are looking for. But it supports a wide variety of protocols.

0


source


Since you used System.Net.Sockets.Socket

in C #, you can use System::Net::Sockets::Socket

in C ++ / CLI - a language that is a .NET feature of C ++.

0


source







All Articles