-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathunix_socket_client.h
46 lines (33 loc) · 1.2 KB
/
unix_socket_client.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
#pragma once
#include <memory>
#include <uvw.hpp>
namespace stream_data_processor {
class UnixSocketClient {
public:
virtual void start() = 0;
virtual void stop() = 0;
virtual ~UnixSocketClient() = 0;
protected:
UnixSocketClient() = default;
UnixSocketClient(const UnixSocketClient& /* non-used */) = default;
UnixSocketClient& operator=(const UnixSocketClient& /* non-used */) =
default;
UnixSocketClient(UnixSocketClient&& /* non-used */) = default;
UnixSocketClient& operator=(UnixSocketClient&& /* non-used */) = default;
};
class UnixSocketClientFactory {
public:
virtual std::shared_ptr<UnixSocketClient> createClient(
const std::shared_ptr<uvw::PipeHandle>& pipe_handle) = 0;
virtual ~UnixSocketClientFactory() = 0;
protected:
UnixSocketClientFactory() = default;
UnixSocketClientFactory(const UnixSocketClientFactory& /* non-used */) =
default;
UnixSocketClientFactory& operator=(
const UnixSocketClientFactory& /* non-used */) = default;
UnixSocketClientFactory(UnixSocketClientFactory&& /* non-used */) = default;
UnixSocketClientFactory& operator=(
UnixSocketClientFactory&& /* non-used */) = default;
};
} // namespace stream_data_processor