From f4e2c7f0603fdb0609bf163ee5ea683a44b98d69 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Tue, 20 Mar 2012 21:42:09 +0900 Subject: Added JSON-RPC over WebSocket. Wslay library must be placed under deps/wslay. --- src/HttpServer.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/HttpServer.h') diff --git a/src/HttpServer.h b/src/HttpServer.h index f5ebb4ee..e7d7c2dc 100644 --- a/src/HttpServer.h +++ b/src/HttpServer.h @@ -91,6 +91,12 @@ public: std::string& text, const std::string& contentType); + // Feeds "101 Switching Protocols" response. The |protocol| will + // appear in Upgrade header field. The |headers| is zero or more + // lines of HTTP header field and each line must end with "\r\n". + void feedUpgradeResponse(const std::string& protocol, + const std::string& headers); + bool authenticate(); void setUsernamePassword @@ -129,6 +135,11 @@ public: { allowOrigin_ = allowOrigin; } + + const SharedHandle& getSocket() const + { + return socket_; + } }; } // namespace aria2 -- cgit