OnixS C++ CME iLink 3 Binary Order Entry Handler 1.19.7
Users' manual and API documentation
Loading...
Searching...
No Matches
CgwSession Class Reference

#include <OnixS/CME/iLink3/Session.h>

Public Member Functions

 CgwSession (const SessionSettings &settings, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, UInt64 uuid=UndefinedUuid, const std::string &customKey="")
 CgwSession (SessionReactor &stack, const SessionSettings &settings, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, UInt64 uuid=UndefinedUuid, const std::string &customKey="")
Public Member Functions inherited from Session
 Session (const SessionSettings &settings, int marketSegmentId, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, UInt64 uuid=UndefinedUuid, const std::string &customKey="")
 Session (SessionReactor &stack, const SessionSettings &settings, int marketSegmentId, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, UInt64 uuid=UndefinedUuid, const std::string &customKey="")
 ~Session ()
UInt64 uuid () const noexcept
std::string id () const
int marketSegmentId () const noexcept
std::string customKey () const
bool negotiated () const
Session & negotiated (bool negotiated)
Messaging::FTI::Enum faultToleranceIndicator () const
Session & faultToleranceIndicator (Messaging::FTI::Enum value)
Session & connect (const std::string &host, Port port)
Threading::SharedFuture< void > connectAsync (const std::string &host, Port port)
Session & disconnect (const std::string &reason="")
Threading::SharedFuture< void > disconnectAsync (const std::string &reason="")
Session & breakConnection ()
Threading::SharedFuture< void > breakConnectionAsync ()
template<typename SbeMessageType, size_t MaxMessageSize, typename MessageInitializer>
Session & send (Messaging::MessageHolder< SbeMessageType, MaxMessageSize, MessageInitializer > &msg, Messaging::Timestamp sendingTime=UtcWatch::now())
template<typename SbeMessageType, size_t MaxMessageSize, typename MessageInitializer>
Session & send (Messaging::MessageHolder< SbeMessageType, MaxMessageSize, MessageInitializer > &&msg, Messaging::Timestamp sendingTime=UtcWatch::now())
template<typename SbeMessageType, size_t MaxMessageSize, typename MessageInitializer>
Session & send (MessageBatch< SbeMessageType, MaxMessageSize, MessageInitializer > &msgs, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=CmeMaxPacketSize)
Session & send (MessageBatchCombiner &msgs, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=CmeMaxPacketSize)
Session & send (NetworkMessage *begin, NetworkMessage *end, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=CmeMaxPacketSize) ONIXS_ILINK3_NONULL
Session & send (NetMessagesRange range, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=CmeMaxPacketSize)
Session & sendSequenceMessage (Messaging::KeepAliveLapsed::Enum keepAliveLapsed=Messaging::KeepAliveLapsed::Lapsed)
template<typename SbeMessageType, size_t MaxMessageSize>
Session & warmUp (Messaging::MessageHolder< SbeMessageType, MaxMessageSize > &msg, Messaging::Timestamp sendingTime=UtcWatch::now(), int warmupFlags=0)
template<typename SbeMessageType, size_t MaxMessageSize, typename MessageInitializer>
Session & warmUp (MessageBatch< SbeMessageType, MaxMessageSize, MessageInitializer > &msgs, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=CmeMaxPacketSize, int warmupFlags=0)
Session & warmUp (MessageBatchCombiner &msgs, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=CmeMaxPacketSize, int warmupFlags=0)
Session & warmUp (NetworkMessage *begin, NetworkMessage *end, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=CmeMaxPacketSize, int warmupFlags=0) ONIXS_ILINK3_NONULL
Session & warmUp (NetMessagesRange range, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=CmeMaxPacketSize, int warmupFlags=0)
Session & throttle ()
size_t tryThrottle ()
Session & throttlingLimit (size_t messagesCount, size_t intervalInMs=1000)
std::string remoteHost () const
std::string remoteIpAddress () const
Port remotePort () const
std::pair< Port, Port > localPortRange () const noexcept
Session & localPortRange (std::pair< Port, Port > portRange)
std::string localNetworkInterface () const
Session & localNetworkInterface (const std::string &value)
Port localPort () const
bool tcpNoDelayOption () const
Session & tcpNoDelayOption (bool value)
const SocketOptions & socketOptions () const
Session & socketOptions (const SocketOptions &options)
Session & receivingThreadAffinity (CpuIndex cpuIndex)
Session & receivingThreadAffinity (const CpuIndexes &cpuIndexes)
const CpuIndexes & receivingThreadAffinity () const
Session & sendingThreadAffinity (CpuIndex cpuIndex)
Session & sendingThreadAffinity (const CpuIndexes &cpuIndexes)
const CpuIndexes & sendingThreadAffinity () const
int receivingThreadPriority () const
Session & receivingThreadPriority (int priority)
int sendingThreadPriority () const
Session & sendingThreadPriority (int priority)
int receivingThreadPolicy () const
Session & receivingThreadPolicy (int policy)
int sendingThreadPolicy () const
Session & sendingThreadPolicy (int policy)
unsigned receiveSpinningTimeout () const noexcept
Session & receiveSpinningTimeout (unsigned timeoutInUs)
unsigned sendSpinningTimeout () const noexcept
Session & sendSpinningTimeout (unsigned timeoutInUs)
bool reportNewMessagesWhileWaitingForMissedMessages () const
Session & reportNewMessagesWhileWaitingForMissedMessages (bool value)
unsigned messageGrouping () const noexcept
Session & messageGrouping (unsigned numberOfMessagesToGroup)
ThreadingModel::Enum threadingModel () const
SessionStorageType::Enum storageType () const noexcept
const std::string & storageId () const noexcept
SeqNumber outSeqNum () const noexcept
Session & outSeqNum (SeqNumber nextOutSeqNum)
SeqNumber inSeqNum () const
Session & inSeqNum (SeqNumber nextExpectedInSeqNum)
SeqNumber previousSeqNo () const noexcept
Session & previousSeqNo (SeqNumber value)
Messaging::UInt64 previousUuid () const noexcept
Session & previousUuid (Messaging::UInt64 value)
Session & reset (bool startOfWeek=false)
SessionStateId::Enum state () const
Messaging::Timestamp creationTime () const noexcept
void flushSessionStorage ()
unsigned reconnectAttempts () const
Session & reconnectAttempts (unsigned reconnectAttempts)
unsigned reconnectInterval () const
Session & reconnectInterval (unsigned seconds)
bool localTimeUsage () const
Session & localTimeUsage (bool useLocalTime)
const std::string & storageDirectory () const
bool logBeforeSending () const
Session & logBeforeSending (bool value)
size_t incomingMessageGapQueueMaximumSize () const
Session & incomingMessageGapQueueMaximumSize (size_t value)
const Session & log (const std::string &message) const
std::string toString () const
Messaging::Timestamp licenseExpirationDate () const
Messaging::SchemaVersion messagingVersion () const noexcept
bool detectMessageGapForPreviousUuid () const
Session & detectMessageGapForPreviousUuid (bool detectGap)
Handle socketHandle ()
size_t outboundQueueBytes ()
bool getTcpInfo (TcpInfo &)

Additional Inherited Members

Static Public Member Functions inherited from Session
static std::string version ()
Static Public Attributes inherited from Session
static const UInt64 UndefinedUuid = 0
static const size_t CmeMaxPacketSize = 1420
static const int UndefinedAffinity = -1
static const Handle InvalidSocketHandle

Detailed Description

An iLink 3 Session for CME Convenience Gateways (CGW).

Definition at line 684 of file Session.h.

Constructor & Destructor Documentation

◆ CgwSession() [1/2]

CgwSession ( const SessionSettings & settings,
SessionListener * listener,
SessionStorageType::Enum storageType = SessionStorageType::FileBased,
SessionStorage * storage = nullptr,
UInt64 uuid = UndefinedUuid,
const std::string & customKey = "" )

Constructor.

Parameters
settingsSession settings.
listenerSession listener.
storageTypeSession storage type.
storageSession storage.
uuidUniversally Unique Identifier (UUID).
customKeyCustom key that could be used to distinguish sessions with the same UUID, Session ID and FirmId values.

◆ CgwSession() [2/2]

CgwSession ( SessionReactor & stack,
const SessionSettings & settings,
SessionListener * listener,
SessionStorageType::Enum storageType = SessionStorageType::FileBased,
SessionStorage * storage = nullptr,
UInt64 uuid = UndefinedUuid,
const std::string & customKey = "" )

Constructor.

Parameters
stackExternally provided reactor.
settingsSession settings.
listenerSession listener.
storageTypeSession storage type.
storageSession storage.
uuidUniversally Unique Identifier (UUID).
customKeyCustom key that could be used to distinguish sessions with the same UUID, Session ID and FirmId values.