42namespace AdHoc {
struct SessionHelper; };
76 std::
string id() const;
134 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
139#if defined (ONIXS_B3_BOE_CXX11)
150 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
160#if defined (ONIXS_B3_BOE_CXX11)
177 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
227 template <
typename SbeMessageType,
size_t MaxMessageSize>
231 int warmupFlags = 0);
234#if defined (ONIXS_B3_BOE_CXX11)
251 template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
256 int warmupFlags = 0);
533 template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
534 void validate(const
Messaging::
MessageHolder<SbeMessageType, MaxMessageSize, MessageInitializer> &msg) const;
546template <typename SbeMessageType,
size_t MaxMessageSize, typename MessageInitializer>
556 send(msg.toNetworkMessage(), ts);
561template <
typename SbeMessageType,
size_t MaxMessageSize>
573#if defined (ONIXS_B3_BOE_CXX11)
575template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
587#if defined (ONIXS_B3_BOE_CXX11)
589template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
594 size_t maxPacketSize)
598 send(msgs.netMsgs_, maxPacketSize, ts);
602template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
610 warmUp(msgs.netMsgs_, maxPacketSize, flags, ts);
616template <
typename SbeMessageType,
size_t MaxMessageSize,
typename MessageInitializer>
619 validateVersion(holder->version());
#define ONIXS_B3_BOE_NULLPTR
#define ONIXS_B3_BOE_EXPORTED
#define ONIXS_B3_BOE_NOTHROW
#define ONIXS_B3_BOE_HOTPATH
NetworkMessage toNetworkMessage() noexcept
The time point without the time-zone information.
Session's network stack reactor interface.
bool localTimeUsage() const
Messaging::Timestamp licenseExpirationDate() const
unsigned messageGrouping() const noexcept
std::string localNetworkInterface() const
std::string customKey() const
static const std::string & version() noexcept
friend struct AdHoc::SessionHelper
static const int UndefinedAffinity
std::string remoteIpAddress() const
std::string toString() const
static const UInt64 UndefinedSessionVerID
std::string remoteHost() const
const SocketOptions & socketOptions() const
Session & warmUp(MessageBatchCombiner &msgs, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=B3BOEMaxPacketSize, int warmupFlags=0)
unsigned reconnectAttempts() const
bool reportNewMessagesWhileWaitingForMissedMessages() const
Session & throttlingLimit(size_t messagesCount, size_t intervalInMs=1000)
SeqNumber outSeqNum() const noexcept
Threading::SharedFuture< void > disconnectAsync()
Messaging::SchemaVersion messagingVersion() const noexcept
std::pair< Port, Port > localPortRange() const noexcept
const std::string & storageDirectory() const
int receivingThreadPolicy() const
size_t incomingMessageGapQueueMaximumSize() const
bool getTcpInfo(TcpInfo &)
unsigned receiveSpinningTimeout() const noexcept
Messaging::SessionID sessionId() const noexcept
Session & warmUp(Messaging::MessageHolder< SbeMessageType, MaxMessageSize > &msg, Messaging::Timestamp sendingTime=UtcWatch::now(), int warmupFlags=0)
Session & receivingThreadAffinity(CpuIndex cpuIndex)
Sets the receiving thread CPU affinity.
ThreadingModel::Enum threadingModel() const
unsigned reconnectInterval() const
SessionStorageType::Enum storageType() const noexcept
int sendingThreadPriority() const
static const size_t B3BOEMaxPacketSize
Packet size maximum behavior based on MTU (Maximum Transmission Unit) 1420 bytes.
size_t outboundQueueBytes()
Returns the total number of bytes in the outbound queue.
const std::string & storageId() const noexcept
static const Handle InvalidSocketHandle
Represents invalid value of socket handle.
bool logBeforeSending() const
Session & sendSequenceMessage()
Session(const SessionSettings &settings, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, UInt64 sessionVerId=UndefinedSessionVerID, const std::string &customKey="")
Session(SessionReactor &stack, const SessionSettings &settings, SessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, SessionStorage *storage=nullptr, UInt64 sessionVerId=UndefinedSessionVerID, const std::string &customKey="")
Messaging::Timestamp creationTime() const noexcept
UInt64 sessionVerId() const noexcept
SessionStateId::Enum state() const
void flushSessionStorage()
Flushes all internal buffers of the session storage.
SeqNumber inSeqNum() const
Session & send(Messaging::MessageHolder< SbeMessageType, MaxMessageSize, MessageInitializer > &msg, Messaging::Timestamp sendingTime=UtcWatch::now())
Session & send(MessageBatchCombiner &msgs, Messaging::Timestamp sendingTime=UtcWatch::now(), size_t maxPacketSize=B3BOEMaxPacketSize)
int receivingThreadPriority() const
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.
Session & sendingThreadAffinity(CpuIndex cpuIndex)
Sets the sending thread CPU affinity.
Session & connect(const std::string &host, Port port)
unsigned sendSpinningTimeout() const noexcept
int sendingThreadPolicy() const
Sets the sending thread policy.
bool tcpNoDelayOption() const
Threading::SharedFuture< void > connectAsync(const std::string &host, Port port)
MessageHeader::Version SchemaVersion
SBE-encoded data version type.
std::vector< NetworkMessage > NetMessages
std::vector< SocketOption > SocketOptions
Socket options.
int Handle
Type alias for socket handle.
std::set< CpuIndex > CpuIndexes
Messaging::UInt32 SeqNumber
@ FileBased
File-based Session Storage.