78 template<
typename MsgType>
83 typedef std::vector<OnixS::FIX::Core::Messaging::Extras::FlatMessage*>
CoreMsgBatchType;
111 const std::string & senderCompId,
112 const std::string & targetCompId,
131 const std::string & senderCompId,
132 const std::string & targetCompId,
150 const std::string & senderCompId,
151 const std::string & targetCompId,
153 bool keepSequenceNumbersAfterLogout,
173 const std::string & senderCompId,
174 const std::string & targetCompId,
176 bool keepSequenceNumbersAfterLogout,
194 const std::string & senderCompId,
195 const std::string & targetCompId,
197 bool keepSequenceNumbersAfterLogout,
199 const std::string & customSessionKey,
218 const std::string & senderCompId,
219 const std::string & targetCompId,
221 bool keepSequenceNumbersAfterLogout,
223 const std::string & customSessionKey,
239 Session & clearOutboundQueue(
bool removeFragmentedPacket =
false);
267 int listenPort()
const;
274 Session & listenPort(
int listenPort);
281 std::string localNetworkInterface()
const;
288 Session & localNetworkInterface(
const std::string & localNetworkInterface);
295 unsigned short localPort()
const;
306 LocalPortRange localPortRange()
const;
313 Session & localPortRange(LocalPortRange portRange);
319 bool tcpNoDelayOption()
const;
324 Session & tcpNoDelayOption(
bool improveLatency =
true);
331 bool sendLogoutOnException()
const;
337 Session & sendLogoutOnException(
bool sendLogoutOnException);
343 bool validateUnknownMessages()
const;
348 Session & validateUnknownMessages(
bool);
354 bool validateUnknownFields()
const;
359 Session & validateUnknownFields(
bool);
365 bool validateRequiredFields()
const;
370 Session & validateRequiredFields(
bool);
376 bool validateFieldValues()
const;
381 Session & validateFieldValues(
bool);
387 bool validateEmptyFieldValues()
const;
392 Session & validateEmptyFieldValues(
bool);
398 bool validateRepeatingGroupEntryCount()
const;
403 Session & validateRepeatingGroupEntryCount(
bool);
409 bool validateRepeatingGroupLeadingTag()
const;
414 Session & validateRepeatingGroupLeadingTag(
bool);
420 bool validateDuplicatedField()
const;
425 Session & validateDuplicatedField(
bool);
431 bool validateChecksum()
const;
436 Session & validateChecksum(
bool);
442 unsigned messageGrouping()
const;
447 Session & messageGrouping(
unsigned numberOfMessagesToGroup);
462 bool useSpinLock()
const;
467 Session & useSpinLock(
bool value);
473 int reasonableTransmissionTime()
const;
484 Session & reasonableTransmissionTime(
int value);
489 Session & reconnectAttempts(
int value);
495 int reconnectAttempts()
const;
500 Session & reconnectInterval(
int value);
506 int reconnectInterval()
const;
513 Session & receiveSpinningTimeoutUsec(
int usec);
519 int receiveSpinningTimeout()
const;
527 Session & sendSpinningTimeoutUsec(
int usec);
533 int sendSpinningTimeout()
const;
538 Session & supportNextExpectedMsgSeqNum(
bool support);
544 bool supportNextExpectedMsgSeqNum()
const;
551 std::string sslCertificateFile()
const;
560 Session & sslCertificateFile(
const std::string & file);
567 std::string sslPrivateKeyFile()
const;
576 Session & sslPrivateKeyFile(
const std::string & file);
597 Session & sslVerifyPeer(
bool verify);
605 bool sslVerifyPeer()
const;
614 Session & sslClientSni(
const std::string & hostName);
619 const std::string & sslClientSni()
const;
626 Session & sslCaFile(
const std::string & value);
633 std::string sslCaFile()
const;
656 Session & logonAsInitiator(
const std::string & host,
int port,
bool setResetSeqNumFlag);
668 Session & logonAsInitiator(
const std::string & host,
int port);
677 Session & logonAsInitiator(
const std::string & host,
int port,
int heartbeatIntervalSec);
686 Session & logonAsInitiator(
const std::string & host,
int port,
int heartbeatIntervalSec,
bool setResetSeqNumFlag);
695 Session & logonAsInitiator(
const std::string & host,
int port,
int heartbeatIntervalSec,
Message * customLogonMsg);
704 Session & logonAsInitiator(
const std::string & host,
int port,
int heartbeatIntervalSec,
Message * customLogonMsg,
bool setResetSeqNumFlag);
740 Session & logout(
const std::string & text);
839 template<
typename MsgType>
855 typedef typename Traits::MsgBatchType::iterator
iterator;
861 void add(MessagePtr & msg) { MsgBatchHelper::add(batch_, coreBatch_, msg); }
863 MsgType &
operator[](
size_t index) {
return *batch_[index]; }
864 const MsgType &
operator[](
size_t index)
const {
return *batch_[index]; }
866 size_t size()
const {
return batch_.size(); }
868 const_iterator
begin()
const {
return batch_.begin(); }
869 iterator
begin() {
return batch_.begin(); }
871 const_iterator
end()
const {
return batch_.end(); }
872 iterator
end() {
return batch_.end(); }
897 Session & send(MessageBatch & msgs,
size_t maxPacketSize = (std::numeric_limits<size_t>::max)());
898 Session & send(FlatMessageBatch & msgs,
size_t maxPacketSize = (std::numeric_limits<size_t>::max)());
946 Session & sendAsIs(FlatMessageBatch & msgs,
size_t maxPacketSize = (std::numeric_limits<size_t>::max)());
964 size_t tryThrottle(
bool resetWhenDelay =
false);
974 Session & throttlingLimit(
size_t messagesCount,
size_t intervalInMs = 1000);
995 static bool checkWarmupFlags(
int warmupFlags,
unsigned short baseListenPort = 5000,
const std::string & localNetworkInterface =
"127.0.0.1");
1002 void preFill(
Message & msg)
const;
1014 void preFill(FlatMessageBatch & msgs)
const;
1028 operator const std::string & ()
const;
1035 const std::string & storageId()
const;
1042 Session & flushSessionStorage();
1052 std::string counterpartyHost()
const;
1059 std::string counterpartyIpAddress()
const;
1066 size_t counterpartyPort()
const;
1073 const std::string & customKey()
const;
1080 size_t outboundQueueBytes()
const;
1085 int heartbeatIntervalSec()
const;
1091 bool logInboundMessages()
const;
1096 Session & logInboundMessages(
bool value);
1102 bool logOutboundMessages()
const;
1107 Session & logOutboundMessages(
bool value);
1119 InboundMessageLogFilter inboundMessageLogFilter()
const;
1126 Session & inboundMessageLogFilter(
const InboundMessageLogFilter & filter);
1138 OutboundMessageLogFilter outboundMessageLogFilter()
const;
1145 Session & outboundMessageLogFilter(
const OutboundMessageLogFilter & filter);
1153 bool logBeforeSending()
const;
1160 Session & logBeforeSending(
bool value);
1205 Session & resendRequestMaximumRange(
int range);
1215 int resendRequestMaximumRange()
const;
1244 const std::string & senderCompId()
const;
1250 bool specifyLastMsgSeqNumProcessed()
const;
1258 Session & specifyLastMsgSeqNumProcessed(
bool specify);
1264 bool updateSendingTimeField()
const;
1269 Session & updateSendingTimeField(
bool specify);
1282 const std::string & targetCompId()
const;
1327 int receivingThreadPriority()
const;
1332 Session & receivingThreadPriority(
int priority);
1337 int sendingThreadPriority()
const;
1342 Session & sendingThreadPriority(
int priority);
1347 int receivingThreadPolicy()
const;
1352 Session & receivingThreadPolicy(
int policy);
1357 int sendingThreadPolicy()
const;
1362 Session & sendingThreadPolicy(
int policy);
1393 Session & reportNewMessagesWhileWaitingForMissedMessages(
bool report);
1398 bool reportNewMessagesWhileWaitingForMissedMessages()
const;
1404 Session & sendResendRequestOnEachMessageGap(
bool send);
1409 bool sendResendRequestOnEachMessageGap()
const;
1417 Session & requestOnlyMissedMessages(
bool request);
1422 bool requestOnlyMissedMessages()
const;
1428 Session & considerRejectOnResendRequestAsGapFill(
bool consider);
1433 bool considerRejectOnResendRequestAsGapFill()
const;
1440 Session & ignoreLessThanExpectedSequenceNumber(
bool ignore);
1445 bool ignoreLessThanExpectedSequenceNumber()
const;
1450 Session & resetLocalSequenceNumbersOnLogon(
bool reset);
1455 bool resetLocalSequenceNumbersOnLogon()
const;
1463 Session & incomingMessageGapQueueMaximumSize(
size_t maxSize);
1469 size_t incomingMessageGapQueueMaximumSize()
const;
1486 Session & unregisterAllListeners();
1495 Session & resetLocalSequenceNumbers();
1502 Session & resetSeqNumViaLogonExchange();
1509 std::string senderSubId()
const;
1516 Session & senderSubId(
const std::string & value);
1523 std::string targetSubId()
const;
1530 Session & targetSubId(
const std::string & value);
1537 std::string senderLocationId()
const;
1544 Session & senderLocationId(
const std::string & value);
1551 std::string targetLocationId()
const;
1558 Session & targetLocationId(
const std::string & value);
1563 Session & validateSequenceNumbers(
bool value);
1569 bool validateSequenceNumbers()
const;
1576 std::string threadNameSuffix()
const;
1588 Session & threadNameSuffix(
const std::string & value);
1636 std::string toString()
const;
1665 Session & logDirectory(
const std::string & value);
1672 const std::string & logDirectory()
const;
1703 Session & scrambleLogonFields(
const ScrambledFields & fields);
1708 ScrambledFields scrambleLogonFields()
const;
1716 Session & sendQueueMaxSize(
size_t size);
1722 size_t sendQueueMaxSize()
const;
1744 int receiveBufferSize()
const;
1752 Session & receiveBufferSize(
int value);
1760 int sendBufferSize()
const;
1768 Session & sendBufferSize(
int value);
1776 void scheduleShrinkToFit();
1784 :host(), port(), username(), password()
1787 ProxySettings(
const std::string & proxyHost,
int proxyPort,
const std::string & proxyUsername = std::string(),
const std::string & proxyPassword = std::string())
1788 :host(proxyHost), port(proxyPort), username(proxyUsername), password(proxyPassword)
1821 const std::string & senderCompId,
1822 const std::string & targetCompId,
1825 bool keepSequenceNumbersAfterLogout,
1828 const std::string & customSessionKey,
1833 friend class Engine::Impl;
The FIX Session - a bi-directional stream of ordered messages between two parties within a continuous...
The file based storage. The session's state and messages are persisted to the file system...
ONIXS_FIXENGINE_API std::ostream & operator<<(std::ostream &os, const Group &group)
Stream output.
Traits::MsgBatchType::iterator iterator
MsgType & operator[](size_t index)
std::set< std::string > InboundMessageLogFilter
Incoming message types to be filtered out from the logs.
static const OnixS::Sockets::Handle InvalidSocketHandle
Represents an invalid value of the socket handle.
const_iterator begin() const
size_t CpuIndex
Logical processors that a thread is allowed to run on (first logical CPU has index 0)...
static TimeSpan zero()
The zero value of the time span.
int Handle
Type alias for socket handle.
std::set< std::string > OutboundMessageLogFilter
Outgoing message types to be filtered out from the logs.
The session's Listener.
FlatMessageBatch SerializedMessageBatch
std::vector< Tag > ScrambledFields
The collection of scrambled tags.
std::vector< OnixS::FIX::Core::Messaging::Message * > CoreMsgBatchType
const MsgType & operator[](size_t index) const
#define ONIXS_FIXENGINE_API
const_iterator end() const
PtrTraits< Message >::UniquePtr MessagePtr
Provides an access to FIX fields from a flat (tag=value) message.
virtual size_t resendingQueueSize() const =0
Returns the number of sent messages that are available for resending on counterparty's Resend Request...
ProxySettings(const std::string &proxyHost, int proxyPort, const std::string &proxyUsername=std::string(), const std::string &proxyPassword=std::string())
std::set< CpuIndex > CpuIndexes
MsgBatch< FlatMessage > FlatMessageBatch
Identifies the FIX messages dictionary.
std::vector< Message * > MsgBatchType
static const int UndefinedPriorityAndPolicy
Represents an undefined value of priority and policy.
Traits::MsgBatchType::const_iterator const_iterator
The session message mode.
ONIXS_FIXENGINE_API_DECL(class, IEngineListener)
virtual void clear()=0
Clears the storage.
The immutable secure string.
std::pair< unsigned short, unsigned short > LocalPortRange
The local port range type.
PtrTraits< MsgType >::UniquePtr MessagePtr
The time span related functionality.
std::vector< FlatMessage * > MsgBatchType
MsgBatch< Message > MessageBatch
The session's pluggable storage.
The session's network stack reactor interface.
unsigned int SequenceNumber
Alias for the sequence number.
std::vector< OnixS::FIX::Core::Messaging::Extras::FlatMessage * > CoreMsgBatchType
Represents a future result of an asynchronous operation - a result that will eventually appear in the...
Encapsulates operations over a FIX Message.
virtual SequenceNumber outSeqNum()=0
Returns the last outgoing sequence number.
std::vector< SocketOption > SocketOptions
Storage type of socket options.
std::auto_ptr< T > UniquePtr
Traits::MessagePtr MessagePtr
void add(MessagePtr &msg)
The timestamps related functionality.
static const unsigned int ResendRequestMaximumRangeNoLimit
Represents an unlimited number of messages to be requested in one Resend Request (MsgType=2) message...
virtual SequenceNumber inSeqNum()=0
Returns the last inbound sequence number.