Remote control of a C ++ program in Ubuntu 12.04 over HTTPS

I have an emulator program written in C ++ running on Ubuntu 12.04. There are some parameters and parameters required to run the program, which are specified by the main arguments. I need to request and manage these parameters over HTTPS from a remote computer / mobile device. I was wondering if anyone can help me with this.

There might be some libraries for convenience, like libcurl. I'm not sure how much this works for my case, but here is an example of a connection in libcurl. It is not necessary to use any libraries; just the most efficient / easy way.

#include <curlpp/cURLpp.hpp>
#include <curlpp/Easy.hpp>
#include <curlpp/Options.hpp>


using namespace curlpp::options;

int main(int, char **)
{
    try
    {
        // That all that is needed to do cleanup of used resources (RAII style).
        curlpp::Cleanup myCleanup;

        // Our request to be sent.
        curlpp::Easy myRequest;

        // Set the URL.
        myRequest.setOpt<Url>("http://example.com");

        // Send request and get a result.
        // By default the result goes to standard output.
        myRequest.perform();
    }

    catch (curlpp::RuntimeError &e)
    {
        std::cout << e.what() << std::endl;
    }

    catch (curlpp::LogicError &e)
    {
        std::cout << e.what() << std::endl;
    }

    return 0;
}

      

0
c ++ https ubuntu networking servlets


source to share


No one has answered this question yet

See similar questions:

3
Good C ++ library for HTTPS connection? The certificate is signed by an authorized certificate

or similar:

1783
C ++ 11 introduced a standardized memory model. What does it mean? And how will this affect C ++ programming?
480
Does the C ++ standard allow uninitialized bool to crash?
471
Why is this program wrongly rejected by the three C ++ compilers?
391
How to install python3 package version via pip on Ubuntu?
296
nodejs vs node on ubuntu 12.04
214
The provided URI scheme "https" is not valid; expected "http". Parameter name: via
3
Associate errors with curlpp
1
C ++ library for sending a simple string for HTTPS requests
0
Invalid result after serialization and deserialization of time_t variable
0
main problems with cURLpp and Eclipse



All Articles
Loading...
X
Show
Funny
Dev
Pics