OnixS ICE iMpact Multicast Price Feed Handler C++ library  8.18.0
API documentation
ConformanceTools.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 "Messages/DebugResponse.h"
25 
26 #include <string>
27 
28 namespace OnixS { namespace ICE { namespace iMpact { namespace MarketData {
29 
30 /// \brief Provides tools for conformance testing.
31 class ONIXS_ICEMDH_EXPORT ConformanceTools
32 {
33 public:
34  /// Opens connection to ICE server and synchronously sends a Debug Request
35  /// and returns the Debug Response.
36  ///
37  /// \param host The host to connect to.
38  /// \param port The port to connect to.
39  /// \param useSsl Indicates whether to use SSL.
40  /// \param timeoutInMilliseconds The timeout in milliseconds.
41  /// \param localNetworkInterface The local network interface to use.
42  ///
43  /// \throws OnixS::ICE::iMpact::MarketData::Exception in case of an error:
44  /// - if the connection to the server cannot be established;
45  /// - if the request cannot be sent;
46  /// - if the response cannot be received.
47  ///
48  /// \returns The Debug Response message structure.
49  static DebugResponse fetchDebugResponse(
50  const std::string& host,
51  int port,
52  bool useSsl = true,
53  unsigned int timeoutInMilliseconds = 30000,
54  const std::string& localNetworkInterface = ""
55  );
56 
57  /// Opens connection to ICE server to fetch Multicast Channel Groups Message.
58  ///
59  /// \param host The host to connect to.
60  /// \param port The port to connect to.
61  /// \param username The username to use.
62  /// \param password The password to use.
63  /// \param useSsl Indicates whether to use SSL.
64  /// \param timeoutInMilliseconds The timeout in milliseconds.
65  /// \param localNetworkInterface The local network interface to use.
66  ///
67  /// \throws OnixS::ICE::iMpact::MarketData::Exception in case of an error:
68  /// - if the connection to the server cannot be established;
69  /// - if the request cannot be sent;
70  /// - if the response cannot be received.
71  ///
72  /// \returns The Multicast Channel Groups message structure.
73  static MulticastChannelGroups fetchMulticastChannelGroups(
74  const std::string& host,
75  int port,
76  const std::string& username,
77  const std::string& password,
78  bool useSsl = true,
79  unsigned int timeoutInMilliseconds = 30000,
80  const std::string& localNetworkInterface = ""
81  );
82 };
83 
84 }}}} // namespace OnixS::ICE::iMpact::MarketData
Declare internal OnixS::ICE::iMpact::MarketData::MulticastChannelGroups message structure.
This class represents the Debug Response Message.
Definition: DebugResponse.h:38
Declare internal OnixS::ICE::iMpact::MarketData::DebugResponse message structure. ...
Provides tools for conformance testing.
This class represents the Multicast Channel Groups Message.