From da1c6058c56059c064f55b81586d6079677fa1b4 Mon Sep 17 00:00:00 2001 From: lado Date: Mon, 1 Apr 2013 00:11:19 +0200 Subject: Feature #790 --- vdr-vdrmanager/sock.h | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'vdr-vdrmanager/sock.h') diff --git a/vdr-vdrmanager/sock.h b/vdr-vdrmanager/sock.h index 0234afc..25a7b83 100644 --- a/vdr-vdrmanager/sock.h +++ b/vdr-vdrmanager/sock.h @@ -5,6 +5,7 @@ #ifndef _VDRMON_SOCK #define _VDRMON_SOCK +#include #include #include #include @@ -17,6 +18,7 @@ protected: int sock; const char * password; bool forceCheckSvdrp; + int compressionMode; protected: cVdrmanagerSocket(); bool IsPasswordSet(); @@ -33,11 +35,18 @@ class cVdrmanagerClientSocket : public cVdrmanagerSocket private: string readbuf; string writebuf; + char * sendbuf; + size_t sendsize; + size_t sendoffset; bool disconnected; + bool initDisconnect; int client; bool login; + bool compression; + bool initCompression; + int compressionMode; public: - cVdrmanagerClientSocket(const char * password); + cVdrmanagerClientSocket(const char * password, int compressionMode); virtual ~cVdrmanagerClientSocket(); bool Attach(int fd); bool IsLineComplete(); @@ -51,6 +60,8 @@ public: bool WritePending(); bool IsLoggedIn(); void SetLoggedIn(); + void ActivateCompression(); + void Compress(); }; class cVdrmanagerServerSocket : public cVdrmanagerSocket @@ -58,7 +69,7 @@ class cVdrmanagerServerSocket : public cVdrmanagerSocket public: cVdrmanagerServerSocket(); virtual ~cVdrmanagerServerSocket(); - bool Create(int port, const char * password, bool forceCheckSvdrp); + bool Create(int port, const char * password, bool forceCheckSvdrp, int compressionMode); cVdrmanagerClientSocket * Accept(); }; -- cgit v1.2.3