/* */ #include "WebSocketResponseCommand.h" #include "SocketCore.h" #include "DownloadEngine.h" #include "HttpServer.h" #include "WebSocketSession.h" #include "WebSocketInteractionCommand.h" namespace aria2 { namespace rpc { WebSocketResponseCommand::WebSocketResponseCommand (cuid_t cuid, const SharedHandle& httpServer, DownloadEngine* e, const SharedHandle& socket) : AbstractHttpServerResponseCommand(cuid, httpServer, e, socket) {} WebSocketResponseCommand::~WebSocketResponseCommand() {} void WebSocketResponseCommand::afterSend (const SharedHandle& httpServer, DownloadEngine* e) { SharedHandle wsSession (new WebSocketSession(httpServer->getSocket(), getDownloadEngine())); WebSocketInteractionCommand* command = new WebSocketInteractionCommand(getCuid(), wsSession, e, wsSession->getSocket()); wsSession->setCommand(command); e->addCommand(command); } } // namespace rpc } // namespace aria2