forked from mdre77/vdr-plugin-vnsiserver
-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathvnsisocket.h
66 lines (48 loc) · 1.1 KB
/
vnsisocket.h
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/*
* vnsisocket.h
*
* Created on: 26.12.2020
* Author: mdrechsler
*/
#pragma once
#include "cxsocket.h"
class ICommandQueue;
class VNSISocket
: public cThread
, public ISocket
{
public:
VNSISocket( int fd,
ICommandQueue& queue );
~VNSISocket() override;
/**************************************************************************
* ISocket virtual overrides
*************************************************************************/
void
Shutdown() override;
void
lock() override;
void
unlock() override;
virtual void
Invalidate() override;
virtual int
GetHandle() const override;
ssize_t
read( void* buffer,
size_t size,
int timeout_ms = -1 ) override;
ssize_t
write( const void* buffer,
size_t size,
int timeout_ms = -1,
bool more_data = false) override;
/**************************************************************************
* cThread virtual overrides
*************************************************************************/
virtual void
Action() override;
private:
cxSocket m_socket;
ICommandQueue& m_queue;
};