Hub.hpp: friend Listener so it can call sharedMapper()
sharedMapper was made private in #6 but Listener::handleMessage (defined later in the same header) still calls Hub::sharedMapper(). Any consumer that actually instantiates the WebSocket Listener hit a private-access compile error. Add `friend class Listener;` so Listener can reach the shared ObjectMapper without exposing it publicly. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
c6a2dba22b
commit
87bf3b6e56
1 changed files with 2 additions and 0 deletions
|
|
@ -66,10 +66,12 @@ struct SocketInfo {
|
|||
* @endcode
|
||||
*/
|
||||
struct HubHousekeeper; // forward-declare for friend (#439)
|
||||
class Listener; // forward-declare for friend (Listener calls Hub::sharedMapper)
|
||||
|
||||
class Hub
|
||||
: public oatpp::websocket::ConnectionHandler::SocketInstanceListener {
|
||||
friend struct HubHousekeeper;
|
||||
friend class Listener;
|
||||
public:
|
||||
using WebSocket = oatpp::websocket::WebSocket;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue