OnixS C++ CME MDP Conflated UDP Handler 1.1.2
API documentation
Loading...
Searching...
No Matches
SocketFeedEngine.h
Go to the documentation of this file.
1// Copyright Onix Solutions Limited [OnixS]. All rights reserved.
2//
3// This software owned by Onix Solutions Limited [OnixS] and is
4// protected by copyright law and international copyright treaties.
5//
6// Access to and use of the software is governed by the terms of the applicable
7// OnixS Software Services Agreement (the Agreement) and Customer end user license
8// agreements granting a non-assignable, non-transferable and non-exclusive license
9// to use the software for it's own data processing purposes under the terms defined
10// in the Agreement.
11//
12// Except as otherwise granted within the terms of the Agreement, copying or
13// reproduction of any part of this source code or associated reference material
14// to any other location for further reproduction or redistribution, and any
15// amendments to this copyright notice, are expressly prohibited.
16//
17// Any reproduction or redistribution for sale or hiring of the Software not in
18// accordance with the terms of the Agreement is a violation of copyright law.
19//
20
21#pragma once
22
26
28
34{
35 PacketSize packetMaxSize_;
36 WatchService* watch_;
37
38 UInt32 socketBufferSize_;
39 UInt32 dataWaitTime_;
40
41public:
45 : packetMaxSize_(1420)
46 , watch_(&UtcWatch::service())
47 , socketBufferSize_(8 * 1024 * 1024)
48 , dataWaitTime_(10)
49 {
50 }
51
56
61 {
62 return packetMaxSize_;
63 }
64
66 void
68 PacketSize value)
69 {
70 packetMaxSize_ = value;
71 }
72
80 {
81 return *watch_;
82 }
83
87 void
90 {
91 watch_ = &watch;
92 }
93
97 UInt32
99 {
100 return socketBufferSize_;
101 }
102
104 void
106 UInt32 value)
107 {
108 socketBufferSize_ = value;
109 }
110
120 UInt32
122 {
123 return dataWaitTime_;
124 }
125
127 void
129 UInt32 value)
130 {
131 dataWaitTime_ = value;
132 }
133};
134
136ONIXS_CONFLATEDUDP_EXPORTED
137void
139 std::string&,
140 const
142
144inline
145std::string
147 const
148 SocketFeedEngineSettings& settings)
149{
150 std::string str;
151
152 toStr(str, settings);
153
154 return str;
155}
156
161SocketFeedEngine : public NetFeedEngine
162{
163 // The workhorse for the multi-threaded
164 // feed engine based on the standard socket
165 // API and a pool of threads.
166 class Workhorse;
167
168 Workhorse* workhorse_;
169
170public:
174
177
180 void
182 std::string&);
183
187 const NetFeed&);
188
193
199 virtual
202};
203
#define ONIXS_CONFLATEDUDP_EXPORTED_CLASS
Definition Bootstrap.h:55
#define ONIXS_CONFLATEDUDP_LTWT_CLASS
Definition Bootstrap.h:95
#define ONIXS_CONFLATEDUDP_NAMESPACE_END
Definition Bootstrap.h:157
#define ONIXS_CONFLATEDUDP_NAMESPACE_BEGIN
Definition Bootstrap.h:153
Base attributes of market data feed.
Definition Feed.h:61
void packetMaxSize(PacketSize value)
Max size for network packet transmitted by MDP.
void socketBufferSize(UInt32 value)
Sets socketBufferSize.
void dataWaitTime(UInt32 value)
Sets dataWaitTime.
virtual NetFeedEngineProcessResult process()
NetFeedLink & allocate(const NetFeed &)
Allocates a link for the given feed.
~SocketFeedEngine()
Destructs the given instance.
SocketFeedEngine(const SocketFeedEngineSettings &)
Initializes the engine according to the given configuration.
ONIXS_CONFLATEDUDP_EXPORTED void toStr(std::string &, BookState::Enum)
Serializes book state value into a string.
UInt32 UInt32
uInt32.
Definition Fields.h:261
UInt16 PacketSize
Integral type for measuring packets.
Abstract watch service.
Definition Watch.h:30