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/WebSocketInteractionCommand.h | 73 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 src/WebSocketInteractionCommand.h (limited to 'src/WebSocketInteractionCommand.h') diff --git a/src/WebSocketInteractionCommand.h b/src/WebSocketInteractionCommand.h new file mode 100644 index 00000000..20f9896c --- /dev/null +++ b/src/WebSocketInteractionCommand.h @@ -0,0 +1,73 @@ +/* */ +#ifndef D_WEB_SOCKET_INTERACTION_COMMAND_H +#define D_WEB_SOCKET_INTERACTION_COMMAND_H + +#include "Command.h" +#include "SharedHandle.h" + +namespace aria2 { + +class DownloadEngine; +class SocketCore; + +namespace rpc { + +class WebSocketSession; + +class WebSocketInteractionCommand : public Command { +private: + DownloadEngine* e_; + SharedHandle socket_; + bool writeCheck_; + SharedHandle wsSession_; +public: + WebSocketInteractionCommand(cuid_t cuid, + const SharedHandle& wsSession, + DownloadEngine* e, + const SharedHandle& socket); + + virtual ~WebSocketInteractionCommand(); + + virtual bool execute(); + + void updateWriteCheck(); +}; + +} // namespace rpc + +} // namespace aria2 + +#endif // D_WEB_SOCKET_INTERACTION_COMMAND_H -- cgit