78template<
typename MsgType>
83 typedef std::vector<OnixS::FIX::Core::Messaging::Extras::FlatMessage*>
CoreMsgBatchType;
153 bool keepSequenceNumbersAfterLogout,
176 bool keepSequenceNumbersAfterLogout,
197 bool keepSequenceNumbersAfterLogout,
199 const std::string & customSessionKey,
221 bool keepSequenceNumbersAfterLogout,
223 const std::string & customSessionKey,
850 template<
typename MsgType>
class MsgBatch;
857 static void init(MBT::CoreMsgBatchType & coreBatch);
859 static void add(MBT::MsgBatchType & batch, MBT::CoreMsgBatchType & coreBatch, MBT::MessagePtr & msg);
861 static void clear(MBT::MsgBatchType & batch);
867 template<
typename MsgType>
874 typename Traits::MsgBatchType batch_;
875 typename Traits::CoreMsgBatchType coreBatch_;
877 MsgBatch(
const MsgBatch&);
878 MsgBatch & operator=(
const MsgBatch&);
883 typedef typename Traits::MsgBatchType::iterator
iterator;
889 void add(
MessagePtr & msg) { MsgBatchHelper::add(batch_, coreBatch_, msg); }
891 MsgType &
operator[](
size_t index) {
return *batch_[index]; }
892 const MsgType &
operator[](
size_t index)
const {
return *batch_[index]; }
894 size_t size()
const {
return batch_.size(); }
1062 operator const std::string & ()
const;
1854 ProxySettings(
const std::string & proxyHost,
int proxyPort,
const std::string & proxyUsername = std::string(),
const std::string & proxyPassword = std::string())
1892 bool keepSequenceNumbersAfterLogout,
1895 const std::string & customSessionKey,
1900 friend class Engine::Impl;
#define ONIXS_FIXENGINE_API_DECL(typeKind, typeName)
#define ONIXS_FIXENGINE_API
#define ONIXS_FIXENGINE_NULLPTR
The immutable secure string.
Identifies the FIX messages dictionary.
Provides an access to FIX fields from a flat (tag=value) message.
The session's network stack reactor interface.
The session's pluggable storage.
Encapsulates operations over a FIX Message.
const_iterator begin() const
const MsgType & operator[](size_t index) const
Traits::MsgBatchType::const_iterator const_iterator
MsgType & operator[](size_t index)
void add(MessagePtr &msg)
const_iterator end() const
Traits::MessagePtr MessagePtr
Traits::MsgBatchType::iterator iterator
The FIX Session - a bi-directional stream of ordered messages between two parties within a continuous...
InboundMessageLogFilter inboundMessageLogFilter() const
Returns incoming message types to be filtered out from the logs.
Session & send(MessageBatch &msgs, size_t maxPacketSize=(std::numeric_limits< size_t >::max)())
Sends messages in a batch to the counterparty.
SequenceNumber inSeqNum() const
Returns the expected sequence number of the next incoming message.
Session & send(FlatMessageBatch &msgs, SessionSendMode::Enum mode, size_t maxPacketSize=(std::numeric_limits< size_t >::max)())
Performs sending via a specific API (e.g.
std::string localNetworkInterface() const
Returns the local network interface from which you intend to send and receive data.
Session & updateSendingTimeField(bool specify)
The option to specify updating of the SendingTime of every sent message.
Session & sendResendRequestOnEachMessageGap(bool send)
By default, the "Resend Request" message is sent only once - when the first gap is detected.
bool validateSequenceNumbers() const
Returns the current status of the incoming message sequence numbers validation.
SslProtocolMinMaxVersion::Enum sslMaxProtocolVersion() const
Returns the maximal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
Session & sendingThreadAffinity(const OnixS::Threading::CpuIndexes &cpuIndexes)
Sets the CPU affinity index of the sending thread.
int heartbeatIntervalSec() const
Returns the Heartbeat interval (in seconds).
Session & sendSpinningTimeoutUsec(int usec)
Sets the send spinning timeout (in microseconds) of the Session::send(..) method to wait for the sock...
bool updateSendingTimeField() const
Returns 'true' if updating of the SendingTime is turn on for every message, otherwise - 'false'.
Session & logOutboundMessages(bool value)
The option to log outbound messages.
~Session()
The destructor.
Session & shutdown()
Shutdowns the session.
int reasonableTransmissionTime() const
Returns the reasonable transmission time as % from the heartbeatIntervalSec value.
Session & receivingThreadAffinity(const OnixS::Threading::CpuIndexes &cpuIndexes)
Sets the CPU affinity of the receiving thread.
Session & throttle()
Performs the throttling of a session that must be called before each send function call.
TimeSpan resendTimeout() const
Returns the timeout during which the counterparty should send a reply to the "Resend Request" message...
Session & targetSubId(const std::string &value)
Sets the TargetSubID (tag 57) field values for all outgoing messages.
int listenPort() const
Returns the port to listen on for incoming FIX Connections in the Acceptor mode.
Session & validateSequenceNumbers(bool value)
Options to turn on/off incoming message sequence numbers validation.
MsgBatchTraits< Message >::MsgBatchType findSentMessages(SequenceNumber beginSequenceNumber, SequenceNumber endSequenceNumber)
Returns an array of sent messages if it can be found by the given message sequence number range,...
Session & sendTestRequest(const std::string &testReqId="", const TimeSpan &timeout=TimeSpan::zero())
Sends the Test Request (MsgType 1) message.
Session & reconnectInterval(int value)
Sets the time interval between the attempts to restore the FIX connection (in seconds).
int reconnectInterval() const
Returns the time interval between the attempts to restore the FIX connection (in seconds).
const OnixS::Threading::CpuIndexes & sendingThreadAffinity() const
Returns the CPU affinity of the sending thread.
Session & sslMinProtocolVersion(SslProtocolMinMaxVersion::Enum version)
Sets the minimal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
Session & warmUp(FlatMessage *msg, int warmupFlags=0)
This method warms up the sending path.
std::string toString() const
Returns the session string presentation.
Session & sendingThreadAffinity(const OnixS::Threading::CpuIndex cpuIndex)
Sets the CPU affinity index of the sending thread a CPU.
friend class Engine::Impl
Session & messageGrouping(unsigned numberOfMessagesToGroup)
Sets the number of messages that should be written to the outgoing TCP buffer together.
MessageMode::Enum messageMode() const
Returns the session message mode.
Session & breakConnection()
Terminates the FIX connection in the non-graceful way (without the exchange of Logout (MsgType=5) mes...
bool ignoreLessThanExpectedSequenceNumber() const
Returns 'true' if the sequence number of the incoming message, which less than expected,...
std::string sslPrivateKeyFile() const
Returns the SSL private key file.
size_t sendQueueMaxSize() const
Returns the send queue maximum size in bytes.
Session & sslClientSni(const std::string &hostName)
Sets the client-side SNI-extension field.
Session & inSeqNum(SequenceNumber seqNum)
Sets the expected sequence number of the next incoming message.
int reconnectAttempts() const
Returns the number of attempts to restore the FIX connection.
Session & logBeforeSending(bool value)
The option to switch on/off the logging of outbound messages before/after sending.
Session & proxySettings(const ProxySettings &settings)
Sets HTTP proxy settings.
Session & scrambleLogonFields(const ScrambledFields &fields)
Sets scrambled fields in the Logon(A) message, in the session storage, for security reasons.
Session & sendAsIs(FlatMessageBatch &msgs, size_t maxPacketSize=(std::numeric_limits< size_t >::max)())
Sends a serialized message(s) to the counterparty without any fields updating.
Session & resendRequestMaximumRange(int range)
Sets the maximum number of messages to be requested in one Resend Request (MsgType=2) message.
Session & sslCaFile(const std::string &value)
Sets the path to the trusted certification authority certificate file in (Privacy Enhanced Mail) Base...
Session & sendReject(SequenceNumber refSeqNumber, const std::string &text)
Sends the Reject (MsgType 3) message.
Session & logout()
Terminates the FIX Connection.
bool validateFieldValues() const
Returns the option to validate the field values of FIX messages in accordance with the FIX protocol o...
bool requestOnlyMissedMessages() const
Returns 'true' if the "Resend Request" message requests only missed messages, otherwise - 'false'.
Session & clearOutboundQueue(bool removeFragmentedPacket=false)
Removes all messages from the outbound queue.
bool enableRxTimestamp() const
Returns the value of the option to enable received data timestamp.
bool considerRejectOnResendRequestAsGapFill() const
Returns 'true' if the "Reject" on the "Resend Request" is considered as the "Sequence Reset Gap Fill"...
Session & supportNextExpectedMsgSeqNum(bool support)
Sets the NextExpectedMsgSeqNum field (tag 789) support in Logon messages.
std::string senderLocationId() const
Returns the SenderLocationID (tag 142) field values for all outgoing messages.
OutboundMessageLogFilter outboundMessageLogFilter() const
Returns outgoing message types to be filtered out from the logs.
Session & resetSeqNumViaLogonExchange()
Sends a Logon message with the ResetSeqNumFlag set.
Session & validateFieldValues(bool)
Sets the option to validate the field values of FIX messages in accordance with the FIX protocol or i...
Dictionary dictionary() const
The instance of the FIX dictionary or standard FIX messages dictionary which is used by the session.
Session & validateEmptyFieldValues(bool)
Sets the option to validate the empty field values of FIX messages in accordance with the FIX protoco...
Session & useSpinLock(bool value)
Sets the Session to use the spin lock.
Session(const std::string &senderCompId, const std::string &targetCompId, const Dictionary &dictionary, bool keepSequenceNumbersAfterLogout, OnixS::FIX::ISessionListener *listener, const std::string &customSessionKey, SessionStorageType::Enum storageType=SessionStorageType::FileBased, ISessionStorage *storage=ONIXS_FIXENGINE_NULLPTR)
Creates the FIX Session.
Session & outboundMessageLogFilter(const OutboundMessageLogFilter &filter)
Sets outgoing message types to be filtered out from the logs.
std::vector< Tag > ScrambledFields
The collection of scrambled tags.
Session & socketOptions(const OnixS::Sockets::SocketOptions &options)
Additional options, which should be set to the session socket when it is created.
Session & validateUnknownMessages(bool)
Sets the option to validate the presence of unknown FIX messages.
Session & listenPort(int listenPort)
Sets the port to listen on for incoming FIX Connections in the Acceptor mode.
size_t outboundQueueBytes() const
Returns the total number of bytes in the outbound queue.
bool reportNewMessagesWhileWaitingForMissedMessages() const
Returns 'true' if the new messages are reported even when the message gap is detected and the reply o...
Session(ISessionReactor *reactor, const std::string &senderCompId, const std::string &targetCompId, const Dictionary &dictionary, bool keepSequenceNumbersAfterLogout, OnixS::FIX::ISessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, ISessionStorage *storage=ONIXS_FIXENGINE_NULLPTR)
Creates the FIX Session.
Session & localPortRange(LocalPortRange portRange)
Sets the local port range, the first available port from this range will be used to send and receive ...
Session & logonAsAcceptor()
Establishes the FIX Connection as an Acceptor.
SslProtocolMinMaxVersion::Enum sslMinProtocolVersion() const
Returns the minimal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
Session & throttlingLimit(size_t messagesCount, size_t intervalInMs=1000)
Sets throttling limit parameters.
Session & tcpNoDelayOption(bool improveLatency=true)
Sets the value of the option to improve the latency at the expense of the message throughput (TCP_NOD...
Session & sslCertificateFile(const std::string &file)
Sets the SSL certificate file.
size_t resendingQueueSize() const
Returns the number of sent messages that are available for resending on the counterparty's Resend Req...
MsgBatchTraits< FlatMessage >::MsgBatchType findSentFlatMessages(SequenceNumber beginSequenceNumber, SequenceNumber endSequenceNumber)
bool validateRepeatingGroupEntryCount() const
Returns the option that controls the repeating group entry count validation.
static const unsigned int ResendRequestMaximumRangeNoLimit
Represents an unlimited number of messages to be requested in one Resend Request (MsgType=2) message.
int receiveBufferSize() const
Returns the size of the TCP buffer allocated to the FIX connection for receiving data.
bool validateChecksum() const
Returns the option that controls the validation of the checksum of the incoming message.
Session & unregisterListener(ISessionListener *listener)
Unregisters the Session listener.
Session & logonAsInitiator(const std::string &host, int port, int heartbeatIntervalSec, bool setResetSeqNumFlag)
Establishes the FIX Connection as an Initiator using the given Heartbeat interval (seconds) and the R...
Session & logonAsInitiator(const std::string &host, int port, int heartbeatIntervalSec, Message *customLogonMsg, bool setResetSeqNumFlag)
Establishes the FIX Connection as an Initiator using the custom Logon message and the ResetSeqNumFlag...
Session & sendAsIs(FlatMessage *msg)
Sends a serialized message(s) to the counterparty without any fields updating.
void messageMode(MessageMode::Enum mode)
Sets the session message mode.
Session & enableRxTimestamp(bool value)
Sets the value of the option to enable received data timestamp.
int sendBufferSize() const
Returns the size of the TCP buffer allocated to the FIX connection for the sending data.
Session & sendingTimeFormat(TimestampFormat::Enum format)
Sets the time format of the SendingTime of every sent message.
Session & logonAsInitiator(const std::string &host, int port)
Establishes the FIX Connection as an Initiator.
Session(ISessionReactor *reactor, const std::string &senderCompId, const std::string &targetCompId, const Dictionary &dictionary, ISessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, ISessionStorage *storage=ONIXS_FIXENGINE_NULLPTR)
Creates the FIX Session.
int receivingThreadPolicy() const
Returns the scheduling policy of the receiving thread.
Session & receiveSpinningTimeoutUsec(int usec)
Sets the non-blocking receive spinning timeout (in microseconds) before the receiving thread enters i...
std::set< std::string > OutboundMessageLogFilter
Outgoing message types to be filtered out from the logs.
Session & requestOnlyMissedMessages(bool request)
By default, the "Resend Request" message requests all messages begin from the first missed one.
size_t incomingMessageGapQueueMaximumSize() const
Returns the maximum size of the incoming message gap queue.
Session(const std::string &senderCompId, const std::string &targetCompId, const Dictionary &dictionary, bool keepSequenceNumbersAfterLogout, OnixS::FIX::ISessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, ISessionStorage *storage=ONIXS_FIXENGINE_NULLPTR)
Creates the FIX Session.
Cryptography::SecureString sslPrivateKeyPassword() const
Returns the SSL private key file password.
Session & send(FlatMessageBatch &msgs, size_t maxPacketSize=(std::numeric_limits< size_t >::max)())
Session & sendingThreadPolicy(int policy)
Sets the scheduling policy of the sending thread.
Session & validateRepeatingGroupEntryCount(bool)
Sets the value of the option that controls the repeating group entry count validation.
size_t tryThrottle(bool resetWhenDelay=false)
Checks the throttling of a session that must be called before each send function call.
Session & logout(FlatMessage *customLogoutMessage)
bool sendResendRequestOnEachMessageGap() const
Returns 'true' if the "Resend Request" message is sent on each detected message sequence number gap,...
Session & sendLogoutOnException(bool sendLogoutOnException)
Sets the value of the option that controls whether to send the logout message before dropping the tel...
EncryptionMethod::Enum encryptionMethod() const
Returns the current encryption method.
const OnixS::Threading::CpuIndexes & receivingThreadAffinity() const
Returns the CPU affinity of the receiving thread.
const std::string & senderCompId() const
Returns the assigned value used to identify the firm sending message (the SenderCompID (tag 49) field...
const std::string & sslClientSni() const
Returns the client-side SNI-extension field.
Session & flushSessionStorage(bool syncData=false)
Flushes all internal buffers of the underlying storage.
Session & resendTimeout(const TimeSpan &timeout)
Sets the timeout during which counterparty should send a reply to the "Resend Request" message.
std::pair< unsigned short, unsigned short > LocalPortRange
The local port range type.
std::string sslCaFile() const
Returns the path to the trusted certification authority certificate file in the (Privacy Enhanced Mai...
Session & logInboundMessages(bool value)
The option to log inbound messages.
static const OnixS::Sockets::Handle InvalidSocketHandle
Represents an invalid value of the socket handle.
Threading::SharedFuture< void > logoutAsync(FlatMessage *customLogoutMessage)
bool logInboundMessages() const
Returns 'true' if inbound messages are logged, otherwise - 'false'.
ScrambledFields scrambleLogonFields() const
Returns scrambled fields in the Logon(A) message.
Session & logout(Message *customLogoutMessage)
Terminates the FIX Connection.
Session & logonAsInitiator(const std::string &host, int port, int heartbeatIntervalSec, Message *customLogonMsg)
Establishes the FIX Connection as an Initiator using the custom Logon message.
Session & send(FlatMessage *msg)
Session & threadingModel(ThreadingModel::Enum value)
Sets the connection mode.
FlatMessageBatch SerializedMessageBatch
std::string targetLocationId() const
Returns the TargetLocationID (tag 143) field values for all outgoing messages.
bool sslVerifyPeer() const
Returns the option to request peer certificates and perform the certificate verification.
unsigned short localPort() const
Returns the local port from which you intend to send and receive data.
Timestamp creationTime() const
Returns the time when logical session was created or the last sequence number reset operation was per...
Session(const std::string &senderCompId, const std::string &targetCompId, const Dictionary &dictionary, ISessionListener *listener, SessionStorageType::Enum storageType=SessionStorageType::FileBased, ISessionStorage *storage=ONIXS_FIXENGINE_NULLPTR)
Creates the FIX Session.
Session & logonAsInitiator(const std::string &host, int port, int heartbeatIntervalSec)
Establishes the FIX Connection as an Initiator using the given Heartbeat interval (seconds).
std::string threadNameSuffix() const
Returns the thread name suffix for receiving (R:threadNameSuffix) and sending (S:threadNameSuffix) th...
Session & sslPrivateKeyFile(const std::string &file)
Sets the SSL private key file.
bool logOutboundMessages() const
Returns 'true' if outbound messages are logged, otherwise - 'false'.
const std::string & logDirectory() const
Inbound and outbound messages, the session's state data are stored in this directory.
Session & receivingThreadPriority(int priority)
Sets the priority of the receiving thread.
ThreadingModel::Enum threadingModel() const
Returns the connection mode.
Session & validateRequiredFields(bool)
Sets the option to validate the presence of required fields in inbound and outbound messages.
void preFill(FlatMessage &msg) const
Pre-fills the following fields in the message or messages batch for sending as is:
Session & sendBufferSize(int value)
Sets the size of the TCP buffer allocated to the FIX connection for the sending data.
const std::string & customKey() const
Returns the Session's Custom Key.
Session & validateDuplicatedField(bool)
Sets value of the option that controls the duplicated field validation.
LocalPortRange localPortRange() const
Returns the local port range, the first available port from this range will be used to send and recei...
Session & sendQueueMaxSize(size_t size)
Sets the send queue maximum size in bytes.
Session & logout(const std::string &text)
Terminates the FIX Connection.
Session & logonAsInitiator(const std::string &host, int port, bool setResetSeqNumFlag)
Establishes the FIX Connection as an Initiator using the ResetSeqNumFlag (tag 141) field.
unsigned messageGrouping() const
Returns the number of messages that should be written to the outgoing TCP buffer together.
Session & incomingMessageGapQueueMaximumSize(size_t maxSize)
If the requestOnlyMissedMessages option is true and the sequence number of an incoming FIX message gr...
int sendingThreadPriority() const
Returns the priority of the sending thread.
Session & receiveBufferSize(int value)
Sets the size of the TCP buffer allocated to the FIX connection for the receiving data.
Message * findSentMessage(SequenceNumber messageSequenceNumber)
Returns the sent message if it can be found by the given message sequence number, otherwise - NULL.
bool resetLocalSequenceNumbersOnLogon() const
Returns 'true' if local sequence numbers are reset automatically to 1 during every logon,...
Session & validateUnknownFields(bool)
Sets the option to validate the presence of unknown fields.
Session & unregisterAllListeners()
Unregisters all Session listener.
Session & ignoreLessThanExpectedSequenceNumber(bool ignore)
By default, if the incoming message has a sequence number less than expected and the PossDupFlag is n...
SequenceNumber outSeqNum() const
Returns the sequence number of the next outgoing message.
int sendSpinningTimeout() const
Returns the current send spinning timeout value (in microseconds).
Session & threadNameSuffix(const std::string &value)
Sets the thread name suffix for receiving ("R:threadNameSuffix") and sending ("S:threadNameSuffix") t...
MsgBatch< Message > MessageBatch
Session & targetLocationId(const std::string &value)
Sets the TargetLocationID (tag 143) field values for all outgoing messages.
bool specifyLastMsgSeqNumProcessed() const
Returns 'true' if the LastMsgSeqNumProcessed (tag 369) field is specified on every message sent,...
Session & sslMaxProtocolVersion(SslProtocolMinMaxVersion::Enum version)
Sets the maximal SSL/TLS protocol version that will be declared during the SSL/TLS handshake.
Session & specifyLastMsgSeqNumProcessed(bool specify)
The option to specify the LastMsgSeqNumProcessed (tag 369) field on every message sent.
FlatMessage * findSentFlatMessage(SequenceNumber messageSequenceNumber)
Session & senderSubId(const std::string &value)
Sets the SenderSubID (tag 50) field values for all outgoing messages.
void preFill(Message &msg) const
Pre-fills session-level fields that are constant during the session's lifetime - SenderCompId,...
OnixS::Sockets::Handle socketHandle()
Returns the socket handle which the session uses to transmit the FIX data.
Session & resetLocalSequenceNumbersOnLogon(bool reset)
The option to automatically reset the local sequence numbers to 1 during every logon.
size_t resendingBatchSize() const
Returns the maximum number of messages sent in reply to the Resend Request <2> before temporarily rel...
Session & receivingThreadPolicy(int policy)
Sets the scheduling policy of the receiving thread.
std::string counterpartyHost() const
Returns the counterparty host name.
SessionState::Enum state() const
Returns the Session's state.
bool logBeforeSending() const
Returns 'true' if outbound messages are logged before sending, otherwise - 'false'.
Threading::SharedFuture< void > logoutAsync(const std::string &text)
Terminates the FIX Connection.
MsgBatch< FlatMessage > FlatMessageBatch
std::string senderSubId() const
Returns the SenderSubID (tag 50) field values for all outgoing messages.
Session & sendResendRequest(SequenceNumber beginSeqNumber)
Sends the Resend Request (MsgType 2) message.
Session & outSeqNum(SequenceNumber seqNum)
Sets the sequence number of the next outgoing message.
Session & inboundMessageLogFilter(const InboundMessageLogFilter &filter)
Sets incoming message types to be filtered out from the logs.
TimeSpan connectTimeout() const
Returns the socket TCP connect timeout (30 sec by default).
SessionRole::Enum role() const
Returns the session role.
Threading::SharedFuture< void > logonAsInitiatorAsync(const std::string &host, int port, int heartbeatIntervalSec, Message *customLogonMsg, bool setResetSeqNumFlag)
Establishes the FIX Connection asynchronously as an Initiator using the custom Logon message and the ...
Session & resendingQueueSize(size_t value)
Sets the number of sent messages that are available for resending on the counterparty's Resend Reques...
Session & send(FlatMessage *msg, SessionSendMode::Enum mode)
Performs sending via a specific API (e.g.
Session & validateRepeatingGroupLeadingTag(bool)
Sets the value of the option that controls the repeating group leading tag validation.
Session & reasonableTransmissionTime(int value)
Sets the reasonable transmission time as % from the heartbeatIntervalSec value.
Session & encryptionMethod(EncryptionMethod::Enum newEncryptionMethod)
Sets the encryption method.
bool validateRequiredFields() const
Returns the option to validate the presence of required fields in inbound and outbound messages.
Session(ISessionReactor *reactor, const std::string &senderCompId, const std::string &targetCompId, const Dictionary &dictionary, bool keepSequenceNumbersAfterLogout, OnixS::FIX::ISessionListener *listener, const std::string &customSessionKey, SessionStorageType::Enum storageType=SessionStorageType::FileBased, ISessionStorage *storage=ONIXS_FIXENGINE_NULLPTR)
Creates the FIX Session.
bool sendLogoutOnException() const
Returns the option that controls whether to send the logout message before dropping the telecommunica...
int receiveSpinningTimeout() const
Returns the current receive spinning timeout value (in microseconds).
int receivingThreadPriority() const
Returns the priority of the receiving thread.
Session & receivingThreadAffinity(const OnixS::Threading::CpuIndex cpuIndex)
Sets the CPU affinity of the receiving thread to a CPU.
Session & reconnectAttempts(int value)
Sets the number of attempts to restore the FIX connection.
Session & senderLocationId(const std::string &value)
Sets the SenderLocationID (tag 142) field values for all outgoing messages.
Session & logDirectory(const std::string &value)
Inbound and outbound messages, the session's state data are stored in this directory.
const std::string & targetCompId() const
Returns the assigned value used to identify the receiving firm (the TargetCompID (tag 56) field value...
Threading::SharedFuture< void > logoutAsync(Message *customLogoutMessage)
Terminates the FIX Connection.
const std::string & storageId() const
Returns the underlying storage Id.
std::string targetSubId() const
Returns the TargetSubID (tag 57) field values for all outgoing messages.
ProxySettings proxySettings() const
Returns HTTP proxy settings.
bool validateDuplicatedField() const
Returns the option that controls the duplicated field validation.
Session & sslPrivateKeyPassword(const Cryptography::SecureString &password)
Sets the SSL private key file password.
Session & validateChecksum(bool)
Sets the validation of the checksum of the incoming message.
Session & connectTimeout(const TimeSpan &timeout)
Sets the socket TCP connect timeout.
Session & reportNewMessagesWhileWaitingForMissedMessages(bool report)
When the message gap is detected the "Resend Request" FIX Message is sent and the Session state is ch...
size_t counterpartyPort() const
Returns the counterparty port number.
Session & registerListener(ISessionListener *listener)
Registers the Session listener.
Session & resendingBatchSize(size_t value)
Sets the maximum number of messages sent in reply to the Resend Request <2> before temporarily releas...
Session & sslVerifyPeer(bool verify)
Set the option to request peer certificates and perform the certificate verification.
int resendRequestMaximumRange() const
Returns the maximum number of messages to be requested in one Resend Request (MsgType=2) message.
Session & localNetworkInterface(const std::string &localNetworkInterface)
Sets the local network interface from which you intend to send and receive data.
std::string sslCertificateFile() const
Returns the SSL certificate file.
bool validateEmptyFieldValues() const
Returns the option to validate the empty field values of FIX messages in accordance with the FIX prot...
void preFill(FlatMessageBatch &msgs) const
static const int UndefinedPriorityAndPolicy
Represents an undefined value of priority and policy.
std::set< std::string > InboundMessageLogFilter
Incoming message types to be filtered out from the logs.
static bool checkWarmupFlags(int warmupFlags, unsigned short baseListenPort=5000, const std::string &localNetworkInterface="127.0.0.1")
Returns 'true' if the given flags work as expected and a real data is not sent to the wire,...
bool supportNextExpectedMsgSeqNum() const
Returns 'true' if the NextExpectedMsgSeqNum field (tag 789) is supported in Logon messages,...
int sendingThreadPolicy() const
Returns the scheduling policy of the sending thread.
bool validateUnknownMessages() const
Returns the option to validate the presence of unknown FIX messages.
std::string counterpartyIpAddress() const
Returns the counterparty address.
bool tcpNoDelayOption() const
Returns the option to improve the latency at the expense of the message throughput (TCP_NODELAY socke...
Session & considerRejectOnResendRequestAsGapFill(bool consider)
By default, if the "Session Level Reject" message is received in replay to the "Resend Request" then ...
bool useSpinLock() const
Returns whether the Session uses the spin lock.
Session & resetLocalSequenceNumbers()
Backups the current log files and resets the local sequence numbers to 1.
bool validateRepeatingGroupLeadingTag() const
Returns the option that controls the repeating group leading tag validation.
Session & sendingThreadPriority(int priority)
Sets the priority of the sending thread.
void scheduleShrinkToFit()
Schedule the memory usage optimization.
Session & send(Message *msg)
Sends the message to the counterparty.
bool validateUnknownFields() const
Returns the option to validate the presence of unknown fields.
The time span related functionality.
static TimeSpan zero()
The zero value of the time span.
The timestamps related functionality.
Represents a future result of an asynchronous operation - a result that will eventually appear in the...
ONIXS_FIXENGINE_API std::ostream & operator<<(std::ostream &os, const Group &group)
Stream output.
unsigned int SequenceNumber
Alias for the sequence number.
std::vector< SocketOption > SocketOptions
Storage type of socket options.
int Handle
Type alias for socket handle.
size_t CpuIndex
Logical processors that a thread is allowed to run on (first logical CPU has index 0).
std::set< CpuIndex > CpuIndexes
The session message mode.
@ FlatMessage
The FlatMessage class is used in inbound callbacks.
@ Message
The default mode. The Message class is used in inbound callbacks.
std::vector< FlatMessage * > MsgBatchType
std::vector< OnixS::FIX::Core::Messaging::Extras::FlatMessage * > CoreMsgBatchType
PtrTraits< MsgType >::UniquePtr MessagePtr
@ FileBased
The file based storage. The session's state and messages are persisted to the file system.
ProxySettings(const std::string &proxyHost, int proxyPort, const std::string &proxyUsername=std::string(), const std::string &proxyPassword=std::string())
std::auto_ptr< T > UniquePtr