equal
deleted
inserted
replaced
19 #include <vector> |
19 #include <vector> |
20 #include <iostream> |
20 #include <iostream> |
21 |
21 |
22 #include <relpipe/common/type/typedefs.h> |
22 #include <relpipe/common/type/typedefs.h> |
23 |
23 |
|
24 #include "Socket.h" |
|
25 |
24 |
26 |
25 namespace relpipe { |
27 namespace relpipe { |
26 namespace out { |
28 namespace out { |
27 namespace socket { |
29 namespace socket { |
|
30 |
|
31 namespace options { |
|
32 static const char OPTION_PROTOCOL[] = "protocol"; |
|
33 static const char OPTION_ROLE[] = "role"; |
|
34 static const char OPTION_MODE[] = "mode"; |
|
35 static const char OPTION_HOST[] = "host"; |
|
36 static const char OPTION_PORT[] = "port"; |
|
37 static const char OPTION_PATH[] = "path"; |
|
38 |
|
39 static const char PROTOCOL_TCP[] = "tcp"; |
|
40 static const char PROTOCOL_UDP[] = "udp"; |
|
41 static const char PROTOCOL_UDS[] = "uds"; |
|
42 static const char PROTOCOL_SCTP[] = "sctp"; |
|
43 |
|
44 static const char ROLE_CLIENT[] = "client"; |
|
45 static const char ROLE_SERVER[] = "server"; |
|
46 |
|
47 static const char MODE_STREAM[] = "stream"; |
|
48 static const char MODE_DATAGRAM[] = "datagram"; |
|
49 } |
28 |
50 |
29 class Configuration { |
51 class Configuration { |
30 public: |
52 public: |
31 |
53 |
32 class SocketOption { |
54 class SocketOption { |
40 virtual ~SocketOption() = default; |
62 virtual ~SocketOption() = default; |
41 }; |
63 }; |
42 |
64 |
43 |
65 |
44 relpipe::common::type::StringX relation = L"socket"; |
66 relpipe::common::type::StringX relation = L"socket"; |
45 relpipe::common::type::StringX connectionString = L"udp://127.0.0.1:64000"; |
|
46 std::vector<SocketOption> options; |
67 std::vector<SocketOption> options; |
47 |
68 |
48 virtual ~Configuration() { |
69 virtual ~Configuration() { |
49 } |
70 } |
50 }; |
71 }; |