65 const std::string
id()
const;
101 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
104#if defined(ONIXS_CONFLATEDTCP_CXX11)
113 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
118#if defined(ONIXS_CONFLATEDTCP_CXX11)
127 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
132#if defined(ONIXS_CONFLATEDTCP_CXX11)
141 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
372 void send(std::vector<Messaging::SbeMessage> msgs, std::vector<Messaging::SimpleOpenFramingHeader *> headers);
379template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
389#if defined(ONIXS_CONFLATEDTCP_CXX11)
391template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
401#if defined(ONIXS_CONFLATEDTCP_CXX11)
403template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
406 std::vector<Messaging::SbeMessage> messages(msgs.size());
407 std::vector<Messaging::SimpleOpenFramingHeader *> headers(msgs.size());
409 for (
size_t i = 0; i < msgs.size(); ++i)
417 send(messages, headers);
424#if defined(ONIXS_CONFLATEDTCP_CXX11)
426template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
430 return send(messages);
#define ONIXS_CONFLATEDTCP_EXPORTED
#define ONIXS_CONFLATEDTCP_NULLPTR
Contains the SimpleOpenFramingHeader, the SBE message, and the data buffer.
const SimpleOpenFramingHeader * header() const noexcept
MessageSize setHeader() noexcept
Calculates the binary size of the message and updates the Simple Open Framing Header accordingly.
The time point without the time-zone information.
unsigned receiveSpinningTimeout() const
Session & reportNewMessagesWhileWaitingForMissedMessages(bool value)
Sets the option to report new messages even when the message gap is detected, and the reply on the Re...
static const UInt64 UndefinedUuid
bool localTimeUsage() const
int marketSegmentId() const
std::string localNetworkInterface() const
bool validateSequenceNumbers() const
static const int UndefinedAffinity
Session & inSeqNum(SeqNumber nextExpectedInSeqNum)
Sets the expected sequence number of the next inbound message.
std::string remoteIpAddress() const
Session & outSeqNum(SeqNumber nextOutSeqNum)
Sets the sequence number of the next outgoing message.
unsigned sendSpinningTimeout() const
std::string toString() const
Session & messageGrouping(unsigned numberOfMessagesToGroup)
Sets the number of messages to be sent together.
Session & logBeforeSending(bool value)
Sets the option to log an outgoing message to the session storage before sending it to the wire.
std::string remoteHost() const
const SocketOptions & socketOptions() const
const std::string customKey() const
Session & disconnect(const std::string &reason="Terminate")
Terminates the connection.
unsigned reconnectAttempts() const
Session & incomingMessageGapQueueMaximumSize(size_t value)
Session & localPortRange(std::pair< Port, Port > portRange)
bool reportNewMessagesWhileWaitingForMissedMessages() const
Session & sendSpinningTimeout(unsigned timeoutInUs)
Sets the send spinning timeout value (in microseconds).
Session & reconnectInterval(unsigned seconds)
Sets the time interval between retries to restore the telecommunications link (seconds).
Session & receivingThreadAffinity(const CpuIndexes &cpuIndexes)
Session & receiveSpinningTimeout(unsigned timeoutInUs)
Sets the receive spinning timeout value (in microseconds).
const std::string & storageDirectory() const
int receivingThreadPolicy() const
size_t incomingMessageGapQueueMaximumSize() const
Session & sendingThreadPolicy(int policy)
Session & reconnectAttempts(unsigned reconnectAttempts)
Sets the maximum number of tries to restore the telecommunications link.
SessionStorageType::Enum storageType() const
const std::string id() const
Session & receivingThreadAffinity(CpuIndex cpuIndex)
Sets the receiving thread CPU affinity.
Session & receivingThreadPriority(int priority)
Sets the scheduling priority of the receiving thread.
SeqNumber previousSeqNo() const
unsigned reconnectInterval() const
Session & sendingThreadAffinity(const CpuIndexes &cpuIndexes)
Sets the sending thread CPU affinity.
unsigned messageGrouping() const
Session & localNetworkInterface(const std::string &value)
Sets the IP Address or name of the local network interface.
Session(const SessionSettings &settings, int marketSegmentId, SessionListener *sessionListener, MDP::MarketDataListener *marketDataListener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, UInt64 uuid=UndefinedUuid, const std::string &customKey="")
Constructor.
int sendingThreadPriority() const
Session & tcpNoDelayOption(bool value)
Sets the TCP_NODELAY option (improve latency at the expense of message throughput).
Session & localTimeUsage(bool useLocalTime)
Specifies the usage of local time in Handler events and logs files.
Messaging::Timestamp creationTime() const
Session & receivingThreadPolicy(int policy)
Sets the receiving thread policy.
std::pair< Port, Port > localPortRange() const
bool logBeforeSending() const
Session & validateSequenceNumbers(bool validate)
Turns on/off the validation of incoming message sequence numbers.
Session & previousSeqNo(SeqNumber value)
Sets the sequence number of the last business message published by CME with the PreviousUUID.
Session & previousUuid(Messaging::UInt64 value)
Sets the UUID from the previously Established session.
Session & send(Messaging::MessageHolder< SbeMessageType, MaxMessageSize, MessageInitializer > &msg)
Sends the message.
Session & reset(bool startOfWeek=false)
Backups the current log files, resets the sequence numbers to 1 and generates a new UUID.
void flushSessionStorage()
Flushes all internal buffers of the session storage.
SeqNumber inSeqNum() const
SeqNumber outSeqNum() const
int receivingThreadPriority() const
const CpuIndexes & receivingThreadAffinity() const
Sets the receiving thread CPU affinity.
const Session & log(const std::string &message) const
Write the given user's message to the Handler's log file using the session formatted Id.
SessionStateId::Enum state()
const std::string & storageId() const
Session & sendingThreadAffinity(CpuIndex cpuIndex)
Sets the sending thread CPU affinity.
Session & connect(const std::string &host, Port port)
Establishes the connection.
Session & socketOptions(const SocketOptions &options)
Sets socket options.
const CpuIndexes & sendingThreadAffinity() const
int sendingThreadPolicy() const
Sets the sending thread policy.
bool tcpNoDelayOption() const
Messaging::UInt64 previousUuid() const
Session & sendingThreadPriority(int priority)
UInt16 MessageSize
Message length type.
std::vector< MessageHolder< MessageTypeT, MaxMessageSize, MessageInitializer > > MessageHolders
std::vector< SocketOption > SocketOptions
Socket options.
std::set< CpuIndex > CpuIndexes
Messaging::UInt32 SeqNumber
Callbacks invoked by Handler during market data processing to reflect various stages of processing.
@ FileBased
File-based Session Storage.