Wraping a class instance in another class

Hello,
I have been trying to wrap a few libraries in a class of my own for quite some time and I just can't seem to figure it out. This is primarilly due to my lack of understanding of classes I believe.

A very simplified example would be this:

Http.h

#pragma once
#ifndef _HTTP_SERVER_H
#define _HTTP_SERVER_H

// Builtin
#include "FS.h"
#include <WiFi.h>

// Vendor
#include <ESPAsyncWebServer.h>
#include <AsyncTCP.h>
#include "ArduinoJson.h"
#include "AsyncJson.h"

class Http {
    private:
        AsyncWebServer server;
    public:
        Http();
        ~Http();
};
#endif

Http.cpp:

#include "../include/communication/http-server.h"

Http::Http() {
    server* = new AsyncWebServer(80);
}

The library I am attempting to wrap is here: GitHub - me-no-dev/ESPAsyncWebServer: Async Web Server for ESP8266 and ESP32
However it is not at all limited to this one, there are many others.
The library's main AsyncWebServer is first defined here: ESPAsyncWebServer/ESPAsyncWebServer.h at master · me-no-dev/ESPAsyncWebServer · GitHub

If anyone could assist me with this I would very much appreciate it. OR if what I am doing is impossible, I would love to know why.

Thank you very much,
-Kevin

Http::Http()
    : server(80)
{

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.