Reputation: 57119
I am a beginner C++ programmer. In C#, I used the System.Net.Sockets.Socket
class, which represents a networking socket, to create/connect a server. How can I do the same thing in C++? Are there any classes like this?
Upvotes: 0
Views: 1422
Reputation: 45104
In windows theres a library called winsock.dll.
In Unix, you can use unix sockets
Then, there’s boost sockets
beej guide to internet sockets
Upvotes: 8
Reputation: 13477
I would recommend reading beej's guide to Network Socket programming. It is a really good source full of good explanations.
Upvotes: 1
Reputation: 27486
I've done a little bit with libcurl, this question has tonnes of answers:
...OK to be fair, libcurl doesn't work directly with sockets, so maybe it's not what you're looking for. But it does support a great many protocols.
Upvotes: 0
Reputation: 111120
Sockets are not a fundamental part of either C or C++. If you are on Windows, start off with Winsock.
Upvotes: 0