Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
looking at how high level languages, like Java, C# and Python handle http requests as a client, I'm wondering what the default approach is in c++ today.
My requirements are:
HTTP Client for a REST Interface
HTTP over SSL
Support of OAuth2 Client credentials
The OAuth2 support I scratched very fast and accepted, that this needs to implemented.
I found a number of libraries, but most of them appear to be rather outdated and a bit "unprofessional".
So here is a list of what I could find and what my thoughts are about these:
libcurl
While this appears to be the most professional choice. The C API is a bummer and of course the OAuth support does not exist. But this seems to be the optimal choice for me right now.
CPR
A c++ wrapper for libcurl and it appears to be a rather badly maintained library, which is a nono. It appears to have https support, but in the github md it says it hasnt.
curlpp
This project appears to be not maintained anymore.
boost::asio
If I am not mistaken, I have to do everythings myself here. I am trying to get sth. done and don't want to reinvent the wheel.
Qt
While it doesn't look bad, I'm kind of reluctant towards using a UI framework for communication. But maybe I'm mistaken.
cpprestsdk
While looking good for my purpose at first, OAuth2 client credentials are not supported. The whole OAuth2 part is flagged as experimental. And thats the case for a few years now. Seems to be unfinished and badly maintained.
Conclusions
So probably c++ isn't the usual language you do http client stuff in, but this is such a basic thing, that I'm suprised about the libraries that are out there.
Did I miss anything big?
What is the default approach at this? Is there a better "high level" choice. Or is the default approach doing it low level boost::asio style for optimal performance?
I think you skipped most common libraries like crow for a small projects and fast pace development. It's quite limited however provides enough functionality.
The Poco Project which is the most mature library I came across and provides a lot of functionality for mature projects.
Related
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
We're running an experiment which will involve collecting data from multiple stations around the world. Each station will be providing HDF5 files with magnetic field measurements in a rate of 1 kHz and some auxiliary data in real time. The latency is going to be a few minutes.
I'm assigned to design this program (in C++, with clients/server model, with server being in linux and clients being cross-platform), and apparently I'll be designing this from scratch. My first concern is not to really do everything from scratch because this will be more error prone and pure wrong, so my question here is: What information/file transfer protocols/libraries should I use so that
The program can live for 10+ years with minimal maintenance
I can have very good support from the community for when I need help.
Since we need something relatively secure, my first thought was libssh (the only cross platform opensource library available out there for ssh), but then after discussing with some pros there I realized that the support there isn't so wonderful because only a few people work with libssh. The pros there hesitated in suggesting OpenSSL, but with OpenSSL I'll have to write my own authentication (apparently, I'm not an expert and that's why I'm asking).
What would you suggest? Please share your vision to whether I should go for OpenSSL, libssh, or something else.
PS: Please, if you're going to start off by saying this question is off-topic, move on and ignore it. Consider being helpful rather than critical.
If you require any additional information, please ask.
I think that OpenSSL might be a good choice.
No you do not have to "write you own authentication" - you just need to generate certificates and keys and put them in the right places - that is all.
I would suggest to look at the examples in <openssl-source-dir>/demos and <openssl-source-dir>/apps to get you started. Reading a book about OpenSSL would also be a good idea - for many other reasons (sometimes not directly related with SSL/TLS).
I hope that helps.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 24 days ago.
Improve this question
I am trying to implement a secure network/client communication using sockets. I am having hard time finding information on how to do so. The only thing that seems to be out there is OpenSSL, but the library seems to be very complicated to use.
Is there an easier library to use that is secure ? If not then what is good documentation to get started on secure programming.
For encryption there are multiple libraries are present.If you have not been saying that OpenSSL is complex then I highly suggest you OpenSSL.But now in your case , I suggest you to try
CryptoPP
its API style and programming paradigms take a little getting used to but you would like it in the end. It provides a wide range of symmetric and asymmetric algorithms with much flexibility. You can find a high level overview and sample codes. It is an easy library to integrate into projects.It is portable across several platforms.
LibTomCrypt
TomCrypt is lightweight and simple. As for quality, TomCrypt is widely accepted as top-quality encryption. Also, it's license is public domain which avoids the attribution hassle for your documentation that BSD licenses give you when writing commercial software.
Crypto++is also a very well reputed libraryTake a look at these libraries as well
google's KeyCZar , botan and Capicom.I hope this anwer will help you :)
Boost.Asio abstracts some of the OpenSSL lower level functions: examples
Keep in mind you have to be careful and it is easy to think that you have a secure system when in fact you do not. Just using OpenSSL doesn't guarantee security. It needs to be used correctly.
The Most Dangerous Code in the World: Validating SSL Certificates in Non-Browser Software
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 8 years ago.
Improve this question
I'am going to have to interact with a SOAP web service, using a C++ application.
I am looking for a library that could help me do that, knowing that there's a few requirement I need to full fill:
It needs to be portable (Windows/Linux)
It needs to be free and open source (but I don't need to sell/distribute my code)
It needs to support asynchronous handling of requests
It needs to be able to support concurrent request to the server, as I will have to manage a pool of requests
It needs to be easy to integrate
As I am not going to have a lot of different type of interactions with the server, I first thought I could just create a nice wrapper around libcurl that will let me connect to the web service. But I was wondering if parsing the reply and serializing SOAP request was not going to be complicated in this case. Using this method, I will be able to manage myself my pool of request, which is a good thing for what I want to do.
So probably I just need a library that makes it easy to parse SOAP request.
The question is, what would you consider doing ? Is there a good SOAP web client library that I could use, or should I do it myself ?
the library that comes to mind to handle SOAP in C++ is gsoap I think it matches your requirements. If I remember correctly some of their tools are not open-sourced if you use them to produce non open-source code. Check the license ...
Great toolkit. Worked very well for me some times ago ...
my2c
EDIT: As said in comment you have tools to generate code from WSDL description. That's those tools that you can not use if you do not want your code to be GPL'ed ^^
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
Improve this question
There is a list of C++ XMLRPC implementations in Wikipedia:
Libiqxmlrpc
Ultra lightweight XML-RPC library for C++
XML-RPC for C and C++
XmlRpc++
XmlRpc C++ client for Windows
gSOAP toolkit for C and C++ supporting XML-RPC and more
libmaia: XML-RPC for Qt/C++
I wonder that people use which of these libraries most. Do you have experience with these libraries?
I've used gSOAP in the past. I found it pretty nice to work with. It's fairly mature and runs on a variety of platforms. I thought the documentation, along with examples to be sufficient. We used it on a project that needed to communicate with ASP.NET web services from a Linux environment.
I think that xmlrpc++ is what you're looking for. Though I can't give objective comparison to every library listed here, I must say that's it's extremely versatile, well-written and somewhat easy to get used to.
Well, it actually some kind of lacks in documentation, but this is also subjective (hate this doxygenized way of presenting information).
Added : ulxmlrpcpp also (never used it, just looked through documentation) seems fine and well-designed.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed 8 years ago.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Improve this question
While raknet seems fairly interesting and really appealing from a feature-point of view, its licensing terms seem to be possibly troublesome for GPL'ed projects that may be leveraged commercially, something which is explicitly forbidden by the terms of the creative commons license.
While there's also opentnl, it doesn't seem to be as actively maintained anymore nowadays, in fact downloading the latest stable tarball even fails during compilation because it doesn't seem to support gcc >= 3.0 (?)
Of course, there's still also enet, but this one cannot be really compared to the abstract features that are supported by raknet/opentnl.
So, apart from any non-trivial dependencies such as ACE, Boost or Poco, are there any viable alternatives for embedding a fairly compact, well-maintained UDP-networking library?
Thanks
The wiki of Ogre3D provides a list of networking libraries and a short description for them.
Though this answer comes late to the party, I'm using OpenTNL for my game, Bitfighter, and I really like it. I use it on OS X, Windows, and Linux without a hitch. True, it's not maintained by its creator, but when I get the time, I'm going to create a new SourceForge project for it so people have a place to post their patches. It's stable and (fairly) well documented, so I would recommend giving it another look.
I have been looking for something very similar, but to no avail. So, I decided to create my own C++ Networking Library, at the time of this writing it isn't complete, but will be very soon. I will keep you up to date if your interested in trying it out. It's features so far are TCP/UDP, IPv4, IPv6 Async/Sync and multicasting. If there are any other features you have in mind that should be implemented, just let me know :)
Unfortunately network programming tends to be non-trivial.
Said that you would be advised to get aquainted with the network programming facilities from either Boost or ACE, as both are mature libraries that have been successfully employed in many applications.
I would also suggest to read C++ Network Programming: Mastering Complexity Using ACE and Patterns and C++ Network Programming: Systematic Reuse with ACE and Frameworks