OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.17.0
API documentation
TcpSettings.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) Onix Solutions Limited. All rights reserved.
3  *
4  * This software owned by Onix Solutions Limited and is protected by copyright law
5  * and international copyright treaties.
6  *
7  * Access to and use of the software is governed by the terms of the applicable ONIXS Software
8  * Services Agreement (the Agreement) and Customer end user license agreements granting
9  * a non-assignable, non-transferable and non-exclusive license to use the software
10  * for it's own data processing purposes under the terms defined in the Agreement.
11  *
12  * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13  * of this source code or associated reference material to any other location for further reproduction
14  * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15  *
16  * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17  * the terms of the Agreement is a violation of copyright law.
18  */
19 
20 #pragma once
21 
22 #include "Export.h"
23 #include "Enumerations.h"
24 
25 #include <iosfwd>
26 #include <string>
27 #include <map>
28 
29 namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
30 
31 /// Defines TCP server options.
32 struct ONIXS_ICEMDH_EXPORT TcpServerSettings
33 {
34  /// Host.
35  std::string ip;
36 
37  /// Port.
38  int port;
39 
40  /// Username.
41  std::string userName;
42 
43  /// Password.
44  std::string password;
45 
46  /// Flag to indicate whether the client wants to get
47  /// Strip Info Messages or not. It is false by default.
49 
50  /// Flag to indicate whether the client wants to get
51  /// Strip Info Messages for UDS or not. It is false by default.
53 
54  /// Indicates Strategy Publication Preference.
56 
57  /// Local network interface from which you
58  /// intend to send and receive TCP data.
59  std::string localNetworkInterface;
60 
61  /// This option determines the size of a
62  /// socket's receive buffer that is used
63  /// by the underlying transport.
64  ///
65  /// By default, receive buffer size is \c 65535.
67 
68  /// Flag to indicate whether the client wants
69  /// to use SSL.
70  ///
71  /// By default, SSL is disabled.
72  bool sslEnabled;
73 
74  /// Default constructor.
76 
77  /// Returns string representation.
78  std::string toString() const;
79 };
80 
81 /// Standard output operator.
82 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const TcpServerSettings&);
83 
84 /// Alias for TCP server settings map.
85 typedef std::map<std::string, TcpServerSettings> TcpServersMap;
86 
87 /// Defines TCP connectivity options.
88 struct ONIXS_ICEMDH_EXPORT TcpSettings
89 {
90  /// TCP servers map.
91  TcpServersMap tcpServers;
92 
93  /// The time interval to determine
94  /// if data is not available in TCP stream.
95  ///
96  /// By default, it is 30000 milliseconds.
97  unsigned int timeoutInMilliseconds;
98 
99  /// The time interval between the attempts to
100  /// restore the telecommunication link (in seconds).
101  ///
102  /// By default, it is 16 seconds.
104 
105  /// Maximum number of reconnect attempts.
106  ///
107  /// \li \c -1 - unlimited
108  /// \li \c 0 - never (default)
109  /// \li \c >0 - the number of attempts
111 
112  /// Default constructor.
113  TcpSettings();
114 
115  /// Returns string representation.
116  std::string toString() const;
117 };
118 
119 /// Standard output operator.
120 ONIXS_ICEMDH_EXPORT std::ostream& operator<<(std::ostream&, const TcpSettings&);
121 
122 }}}} // namespace MarketData, iMpact, ICE, OnixS
TcpServersMap tcpServers
TCP servers map.
Definition: TcpSettings.h:91
std::ostream & operator<<(std::ostream &, const Error &)
Make it printable to formatted C++ I/O streams.
Declare ICE iMpact enumerations.
Defines TCP connectivity options.
Definition: TcpSettings.h:88
StrategyPreference::Enum strategyPreference
Indicates Strategy Publication Preference.
Definition: TcpSettings.h:55
std::map< std::string, TcpServerSettings > TcpServersMap
Alias for TCP server settings map.
Definition: TcpSettings.h:85
Enum
Indicates Strategy Publication Preference.
Definition: Enumerations.h:864