From 57b8aca6da4f7352f55b26c2ef9ded4ca2959e34 Mon Sep 17 00:00:00 2001 From: Michael Weitzel Date: Thu, 8 Oct 2026 04:38:50 +0200 Subject: [PATCH] Avoid name clash with class WebSocketClient by explicit qualification (#2616) Adds an explicit namespace qualification and a forward declaration for class WebSocketClient. This change avoids a name clash on code bases containing unrelated WebSocketClient classes. --- httplib.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/httplib.h b/httplib.h index 001fa68c..c80afc48 100644 --- a/httplib.h +++ b/httplib.h @@ -4412,6 +4412,8 @@ private: namespace ws { +class WebSocketClient; + enum class Opcode : uint8_t { Continuation = 0x0, Text = 0x1, @@ -4513,7 +4515,7 @@ public: private: friend class httplib::Server; - friend class WebSocketClient; + friend class httplib::ws::WebSocketClient; WebSocket( Stream &strm, const Request &req, bool is_server,