25 #if defined(ONIXS_ILINK3_HAS_GATEWAY_EMULATOR) 47 Message::blockLength(Message::Schema::Version)
49 + Message::getMinimalVariableFieldsSize(Message::Schema::Version);
71 using Timeout = std::chrono::milliseconds;
74 const Timeout& acceptTimeout = defaultTimeout(),
75 const Timeout& sendReceiveTimeout = defaultTimeout());
93 Gateway& acceptConnection(const
Timeout& acceptTimeout = defaultTimeout());
97 bool tryAcceptConnection(const
Timeout& acceptTimeout = defaultTimeout());
109 std::atomic<
bool>* stopRequested =
nullptr);
118 const
char * host() const noexcept;
122 int port() const noexcept;
125 Gateway& enableLogger(const
std::
string& logFileName,
unsigned int logLevel = 3);
129 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
130 Gateway& send(iLink3::Messaging::
MessageHolder<SbeMessageType, MaxMessageSize, MessageInitializer>& msg);
134 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
135 Gateway& send(iLink3::Messaging::
MessageHolder<SbeMessageType, MaxMessageSize, MessageInitializer>&& msg);
139 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
144 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
149 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
154 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
161 template <typename TMsg>
195 return faultToleranceIndicator_;
201 faultToleranceIndicator_ = value;
207 Gateway& tcpNoDelayOption(
bool noDelay);
213 bool tcpNoDelayOption()
const noexcept ;
219 int socketReceiveBufferSize()
const;
225 Gateway& socketReceiveBufferSize(
int bufferSize);
231 int socketSendBufferSize()
const noexcept;
237 Gateway& socketSendBufferSize(
int bufferSize);
242 bool isConnectionClosed(
const Timeout& timeout)
const;
247 bool isConnectionClosed()
const;
270 const std::string & reason = std::string());
308 const std::string & reason);
330 Gateway& sendData(
const void* data,
size_t size);
352 template <
typename TMsg>
355 return cast<TMsg>(receive());
358 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
361 const auto messageSize = msg.
setHeader();
362 auto*
const header = msg.
header();
368 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
374 template <
typename Holder>
375 typename std::enable_if<std::is_base_of<TagBased::Message, typename Holder::MessageType>::value>::type
381 template <
typename Holder>
382 typename std::enable_if<!std::is_base_of<TagBased::Message, typename Holder::MessageType>::value>::type
388 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
395 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
402 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
406 for(
auto seqNum : numbers)
414 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
418 for(
auto seqNum : numbers)
Gateway & send(iLink3::Messaging::MessageHolder< SbeMessageType, MaxMessageSize, MessageInitializer > &msg)
Sends the given message.
Contains the SimpleOpenFramingHeader, the SBE message, and the data buffer.
std::vector< std::string > LicenseStores
Folders that contain license file(s).
Messaging::UInt32 SeqNumber
constexpr UInt16 calculateNegotiationResponse501MaxSize()
Client's session messages Listener.
std::chrono::milliseconds Timeout
Timeout alias.
std::enable_if< std::is_base_of< TagBased::Message, typename Holder::MessageType >::value >::type setSeqNum(Holder &msg, SeqNumber num)
CME iLink 3 Gateway Emulator.
any other error condition not mentioned above
MessageSize setHeader() noexcept
Calculates the binary size of the message and updates the Simple Open Framing Header accordingly...
FTI::Enum faultToleranceIndicator() const noexcept
#define ONIXS_ILINK3_EXPORTED
const SimpleOpenFramingHeader * header() const noexcept
Gateway & faultToleranceIndicator(FTI::Enum value)
Sets the Fault Tolerance Indicator.
static Timeout defaultTimeout()
Default timeout.
#define ONIXS_ILINK3_NODISCARD
MessagePtr< TMsg > receiveTypedMessage()
Receives the message of the particular type.
Client's messages Listener.