25 #if defined(ONIXS_B3_BOE_HAS_GATEWAY_EMULATOR) 46 Message::blockLength(Message::Schema::Version)
48 + Message::getMinimalVariableFieldsSize(Message::Schema::Version);
70 using Timeout = std::chrono::milliseconds;
73 const Timeout& acceptTimeout = defaultTimeout(),
74 const Timeout& sendReceiveTimeout = defaultTimeout());
92 Gateway& acceptConnection(const
Timeout& acceptTimeout = defaultTimeout());
96 bool tryAcceptConnection(const
Timeout& acceptTimeout = defaultTimeout());
108 std::atomic<
bool>* stopRequested =
nullptr);
111 Gateway& sendSequence(UInt32 nextSeqNo);
117 const
char * host() const noexcept;
121 int port() const noexcept;
124 Gateway& enableLogger(const
std::
string& logFileName,
unsigned int logLevel = 3);
128 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
129 Gateway& send(BOE::Messaging::
MessageHolder<SbeMessageType, MaxMessageSize, MessageInitializer>& msg);
133 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
134 Gateway& send(BOE::Messaging::
MessageHolder<SbeMessageType, MaxMessageSize, MessageInitializer>&& msg);
138 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
143 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
148 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
153 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
160 template <typename TMsg>
185 UInt64 sessionVerId() const noexcept
198 Gateway& tcpNoDelayOption(
bool noDelay);
204 bool tcpNoDelayOption()
const noexcept ;
210 int socketReceiveBufferSize()
const;
216 Gateway& socketReceiveBufferSize(
int bufferSize);
222 int socketSendBufferSize()
const noexcept;
228 Gateway& socketSendBufferSize(
int bufferSize);
233 bool isConnectionClosed(
const Timeout& timeout)
const;
238 bool isConnectionClosed()
const;
270 Establish4Ptr acceptEstablish(UInt32 outgoingSequenceNumber = 1,
unsigned gatewayKeepAliveInterval = 0);
318 Gateway& sendData(
const void* data,
size_t size);
342 template <
typename TMsg>
345 return cast<TMsg>(receive());
348 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
351 const auto messageSize = msg.
setHeader();
352 auto*
const header = msg.
header();
358 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
364 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
367 auto & header = msg->businessHeader();
368 header.setMsgSeqNum(num);
372 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
375 auto & header = msg->businessHeader();
376 header.setMsgSeqNum(num);
380 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
384 for(
auto seqNum : numbers)
392 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
396 for(
auto seqNum : numbers)
Enum
Identifies the code of reject establishment.
constexpr UInt16 calculateNegotiateResponse2MaxSize()
Contains the SimpleOpenFramingHeader, the SBE message, and the data buffer.
Client's messages Listener.
SessionID sessionId() const noexcept
Gateway & send(BOE::Messaging::MessageHolder< SbeMessageType, MaxMessageSize, MessageInitializer > &msg)
Sends the given message.
#define ONIXS_B3_BOE_EXPORTED
Enum
Identifies the code of termination.
Enum
Identifies the code of reject negotiation.
UInt32 SessionID
Client connection identification on the gateway assigned by B3.
SessionID sessionId_
sessionId.
Client's session messages Listener.
#define ONIXS_B3_BOE_NODISCARD
MessageSize setHeader() noexcept
Calculates the binary size of the message and updates the Simple Open Framing Header accordingly...
MessagePtr< TMsg > receiveTypedMessage()
Receives the message of the particular type.
Messaging::UInt32 SeqNumber
The NegotiationResponse message is sent when a Negotiate message from the client is accepted by B3...
std::vector< std::string > LicenseStores
Folders that contain license file(s).
const SimpleOpenFramingHeader * header() const noexcept
static Timeout defaultTimeout()
Default timeout.
std::chrono::milliseconds Timeout
Timeout alias.