summaryrefslogtreecommitdiff
path: root/vdr-vdrmanager/serversock.h
blob: 6269574ad1b3d2b6238db35b61ff2fdfadadb1ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
/*
 * extendes sockets
 */

#ifndef _VDRMON_SERVERSOCK
#define _VDRMON_SERVERSOCK

#include <unistd.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <string>

#include "clientsock.h"

#if VDRMANAGER_USE_SSL
#define SSL_NO_RETRY       0
#define SSL_RETRY_READ     1
#define SSL_RETRY_WRITE    2
#endif

using namespace std;

class cVdrmanagerServerSocket : public cVdrmanagerSocket
{
private:
  int port;
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