summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager/serversock.h
diff options
context:
space:
mode:
Diffstat (limited to 'vdr-vdrmanager/serversock.h')
-rw-r--r--vdr-vdrmanager/serversock.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/vdr-vdrmanager/serversock.h b/vdr-vdrmanager/serversock.h
new file mode 100644
index 0000000..53eec62
--- /dev/null
+++ b/vdr-vdrmanager/serversock.h
@@ -0,0 +1,35 @@
+/*
+ * extendes sockets
+ */
+
+#ifndef _VDRMON_SERVERSOCK
+#define _VDRMON_SERVERSOCK
+
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <openssl/ssl.h>
+#include <string>
+
+#include "clientsock.h"
+
+#define SSL_NO_RETRY 0
+#define SSL_RETRY_READ 1
+#define SSL_RETRY_WRITE 2
+
+using namespace std;
+
+class cVdrmanagerServerSocket : public cVdrmanagerSocket
+{
+private:
+ int port;
+ SSL_CTX * sslCtx;
+public:
+ cVdrmanagerServerSocket();
+ virtual ~cVdrmanagerServerSocket();
+ bool Create(int port, const char * password, bool forceCheckSvdrp, int compressionMode, const char * certFile, const char * keyFile);
+ cVdrmanagerClientSocket * Accept();
+ int GetPort();
+};
+
+#endif