18 Jul, 2007, Caius wrote in the 1st comment:
Votes: 0
I'm looking for a decent C++ wrapper for the Berkley sockets C API. Currently I'm playing around with Anders Hedström's C++ Sockets Library, and it seems both easy to use and rich in features so far.

Has anyone else used this library and can comment on its use in a real life application?

If not, can you recommend any other, similar, libraries that you've found useful?
19 Jul, 2007, Omega wrote in the 2nd comment:
Votes: 0
I've always found that when using sockets, it is always best to code the features yourself, as you will have a better understanding of their inner workings, aswell as beable to debug any issues that should arise, apposed to having to figure out someone else's library if it bugs out.

Just my personal belief.
19 Jul, 2007, Guest wrote in the 3rd comment:
Votes: 0
That C++ sockets library sure looks like an awful lot of complication on top of what are relatively simple functions to read and write the data.
19 Jul, 2007, Caius wrote in the 4th comment:
Votes: 0
Samson said:
That C++ sockets library sure looks like an awful lot of complication on top of what are relatively simple functions to read and write the data.

Like any other library you use only the parts you actually need. It may look like overkill if you just look at the UML diagrams in the documentation, but when you get down to it it's pretty simple and straight forward.

Darien said:
I've always found that when using sockets, it is always best to code the features yourself, as you will have a better understanding of their inner workings, aswell as beable to debug any issues that should arise, apposed to having to figure out someone else's library if it bugs out.

If you use C++ I'm sure you use STL strings and vectors everyday. I wouldn't code my own string or dynamic array classes unless I really needed to. Why would it be different with sockets? As for the debugging part, you're right. That's why it's a good idea to choose libraries that are still maintained.
19 Jul, 2007, Guest wrote in the 5th comment:
Votes: 0
Caius said:
Like any other library you use only the parts you actually need. It may look like overkill if you just look at the UML diagrams in the documentation, but when you get down to it it's pretty simple and straight forward.


I wasn't referring to the UML diagrams or any of that. I didn't even look for any. I was referring to the sheer volume of code. It just seemed like a lot of source to do the job. But then who knows, I have no idea how much source is behind the C functions we all do now.
19 Jul, 2007, Caius wrote in the 6th comment:
Votes: 0
Yes, it's a little on the large side. But then it's a general purpose library. But it's flexible and easy to use. I've set up a server that accepts connections, prints a welcome message, and handles incoming data. Only required about 40 lines of code in total.
0.0/6