You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: inc/finalmq/streamconnection/ConnectionData.h
+35-4Lines changed: 35 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -25,19 +25,49 @@
25
25
#include<chrono>
26
26
#include<string>
27
27
28
+
#include"OpenSsl.h"
28
29
#include"finalmq/helpers/FmqDefines.h"
30
+
#include"finalmq/variant/Variant.h"
29
31
30
32
namespacefinalmq
31
33
{
32
34
enumclassConnectionState
33
35
{
34
36
CONNECTIONSTATE_CREATED = 0,
35
-
CONNECTIONSTATE_CONNECTING = 1,
36
-
CONNECTIONSTATE_CONNECTING_FAILED = 2,
37
-
CONNECTIONSTATE_CONNECTED = 3,
38
-
CONNECTIONSTATE_DISCONNECTED = 4,
37
+
CONNECTIONSTATE_RECONNECT = 1,
38
+
CONNECTIONSTATE_CONNECTING = 2,
39
+
CONNECTIONSTATE_CONNECTING_FAILED = 3,
40
+
CONNECTIONSTATE_CONNECTED = 4,
41
+
CONNECTIONSTATE_DISCONNECTED = 5,
39
42
};
40
43
44
+
structBindProperties
45
+
{
46
+
CertificateData certificateData{};
47
+
Variant protocolData{};
48
+
Variant formatData{}; ///< data for the serialization format
49
+
};
50
+
51
+
structConnectConfig
52
+
{
53
+
ConnectConfig(int r = 1000, int t = -1)
54
+
: reconnectInterval(r)
55
+
, totalReconnectDuration(t)
56
+
{
57
+
}
58
+
int reconnectInterval{1000}; ///< if the server is not available, you can pass a reconnection intervall in [ms]
59
+
int totalReconnectDuration{-1}; ///< if the server is not available, you can pass a duration in [ms] how long the reconnect shall happen. -1 means: try for ever.
60
+
};
61
+
62
+
structConnectProperties
63
+
{
64
+
CertificateData certificateData{};
65
+
ConnectConfig config{};
66
+
Variant protocolData{};
67
+
Variant formatData{}; ///< data for the serialization format
Copy file name to clipboardExpand all lines: inc/finalmq/streamconnection/StreamConnection.h
+2-21Lines changed: 2 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -36,31 +36,10 @@
36
36
#include"finalmq/helpers/hybrid_ptr.h"
37
37
#include"finalmq/poller/Poller.h"
38
38
#include"finalmq/streamconnection/IMessage.h"
39
-
#include"finalmq/variant/Variant.h"
40
39
41
40
namespacefinalmq
42
41
{
43
42
44
-
structBindProperties
45
-
{
46
-
CertificateData certificateData{};
47
-
Variant protocolData{};
48
-
Variant formatData{}; ///< data for the serialization format
49
-
};
50
-
51
-
structConnectConfig
52
-
{
53
-
int reconnectInterval = 1000; ///< if the server is not available, you can pass a reconnection intervall in [ms]
54
-
int totalReconnectDuration = -1; ///< if the server is not available, you can pass a duration in [ms] how long the reconnect shall happen. -1 means: try for ever.
55
-
};
56
-
57
-
structConnectProperties
58
-
{
59
-
CertificateData certificateData{};
60
-
ConnectConfig config{};
61
-
Variant protocolData{};
62
-
Variant formatData{}; ///< data for the serialization format
int ret = m_socketPrivate->connect(reinterpret_cast<const sockaddr*>(m_connectionData.sockaddr.c_str()), static_cast<int>(m_connectionData.sockaddr.size()));
0 commit comments