Difficulty with WiFiServer Object Class

Hi,

I’m writing a class to manage communication by encapsulating the a WiFiServer() object. I’m still new-ish to C++, but not to OO programming (primarily Python).

The following code defines this encapsulating class, and as you can see it’s intended to hold a pointer to a WiFiServer() object, and when instantiated it’s passed a pointer to a WiFiServer object.
This is using the WiFiNINA library, if it matters.

class WiFiBus : public MLCUBus {
public:
	WiFiBus(WiFiServer* server);
	boolean update(unsigned long MLCUTime);
	WiFiServer* bus;
};

When I try to compile it, I get the error message comm_bus.h: 173:20: error: expected ‘)’ before '’ token WiFiBus(WiFiServer server). I’ve tried this a few different ways including re-working it to have the WiFiBus class create the WiFiServer itself, and store it in the class:

class WiFiBus : public MLCUBus {
public:
	WiFiBus(uint16_t port);
	boolean update(unsigned long MLCUTime);
	WiFiServer bus;
};

//...and in the body...

WiFiBus::WiFiBus(uint16_t port) {
	bus = WiFiServer(port);
}

This version fails to compile with the message comm_bus.h: 175:2: error: ‘WiFiServer’ does not name a type. I’m confused because I have other methods that pass or hold objects by pointer, and they work fine. Inspecting the definition of WiFiServer, it is indeed a proper class, such that I think it’s valid to define a pointer to it. Ideas? Help?

Excerpt from WiFiServer.h

class WiFiServer : public Server {
private:
  uint8_t _sock;
  uint16_t _port;
  void*     pcb;
public:
  WiFiServer(uint16_t);
  WiFiClient available(uint8_t* status = NULL);
  void begin();
  virtual size_t write(uint8_t);
  virtual size_t write(const uint8_t *buf, size_t size);
  uint8_t status();

  using Print::write;
};

How is your class supposed to know what a WiFiServer is? You are not including the necessary header file in any of the snippets you posted.