OnixS C++ FIX Engine  4.2.0
API Documentation
Session.h
Go to the documentation of this file.
1 /*
2 * Copyright Onix Solutions Limited [OnixS]. All rights reserved.
3 *
4 * This software owned by Onix Solutions Limited [OnixS] and is protected by copyright law
5 * and international copyright treaties.
6 *
7 * Access to and use of the software is governed by the terms of the applicable OnixS Software
8 * Services Agreement (the Agreement) and Customer end user license agreements granting
9 * a non-assignable, non-transferable and non-exclusive license to use the software
10 * for it's own data processing purposes under the terms defined in the Agreement.
11 *
12 * Except as otherwise granted within the terms of the Agreement, copying or reproduction of any part
13 * of this source code or associated reference material to any other location for further reproduction
14 * or redistribution, and any amendments to this copyright notice, are expressly prohibited.
15 *
16 * Any reproduction or redistribution for sale or hiring of the Software not in accordance with
17 * the terms of the Agreement is a violation of copyright law.
18 */
19 
20 #pragma once
21 
22 #include <string>
23 #include <set>
24 #include <vector>
25 #include <utility>
26 
27 #include <iosfwd>
28 
30 
38 
40 
42 
43 #include <OnixS/FIXEngine/Sockets/Definitions.h>
46 
47 namespace OnixS {
48 namespace FIX {
49 ONIXS_FIXENGINE_API_DECL(class, Message);
50 ONIXS_FIXENGINE_API_DECL(class, Dictionary);
51 ONIXS_FIXENGINE_API_DECL(class, Engine);
52 ONIXS_FIXENGINE_API_DECL(class, ISessionListener);
53 ONIXS_FIXENGINE_API_DECL(class, ISessionStorage);
54 
55 /**
56 * FIX Session - a bi-directional stream of ordered messages between two parties within a continuous sequence number series.
57 */
59 {
60 public:
61  /**
62  * Creates the FIX Session.
63  *
64  * @param senderCompId Assigned value used to identify firm sending message (SenderCompID (tag=49) field value in outgoing messages).
65  * @param targetCompId Assigned value used to identify receiving firm (TargetCompID (tag=56) field value in outgoing messages).
66  * @param dictionary FIX dictionary to be used by the session.
67  * @param listener Instance of ISessionListener interface which will receive and handle miscellaneous Session events.
68  * @param storageType Session storage type.
69  * @param storage Pluggable Session storage.
70  */
71  Session(
72  const std::string & senderCompId,
73  const std::string & targetCompId,
74  const Dictionary & dictionary,
75  ISessionListener * listener,
77  ISessionStorage * storage = NULL);
78 
79  /**
80  * Creates the FIX Session.
81  *
82  * @param senderCompId Assigned value used to identify firm sending message (SenderCompID (tag=49) field value in outgoing messages).
83  * @param targetCompId Assigned value used to identify receiving firm (TargetCompID (tag=56) field value in outgoing messages).
84  * @param dictionary FIX dictionary to be used by the session.
85  * @param keepSequenceNumbersAfterLogout Option to keep sequence numbers after the exchange of Logout (MsgType=5) messages.
86  * @param listener Instance of ISessionListener interface which will receive and handle miscellaneous Session events.
87  * @param storageType Session storage type.
88  * @param storage Pluggable Session storage.
89  */
90  Session(
91  const std::string & senderCompId,
92  const std::string & targetCompId,
93  const Dictionary & dictionary,
94  bool keepSequenceNumbersAfterLogout,
97  ISessionStorage * storage = NULL);
98 
99  /**
100  * Creates the FIX Session.
101  *
102  * @param senderCompId Assigned value used to identify firm sending message (SenderCompID (tag=49) field value in outgoing messages).
103  * @param targetCompId Assigned value used to identify receiving firm (TargetCompID (tag=56) field value in outgoing messages).
104  * @param dictionary FIX dictionary to be used by the session.
105  * @param keepSequenceNumbersAfterLogout Option to keep sequence numbers after the exchange of Logout (MsgType=5) messages.
106  * @param listener Instance of ISessionListener interface which will receive and handle miscellaneous Session events.
107  * @param customSessionKey Custom key that can be used to distinguish sessions with the same values of the SenderCompID, TargetCompID and the FIX Protocol version.
108  * @param storageType Session storage type.
109  * @param storage Pluggable Session storage.
110  */
111  Session(
112  const std::string & senderCompId,
113  const std::string & targetCompId,
114  const Dictionary & dictionary,
115  bool keepSequenceNumbersAfterLogout,
116  OnixS::FIX::ISessionListener * listener,
117  const std::string & customSessionKey,
119  ISessionStorage * storage = NULL);
120 
121  /**
122  * Destructor.
123  */
124  ~Session();
125 
126  /**
127  * Removes all messages from the outbound queue.
128  *
129  * @param removeFragmentedPacket - specifies whether to remove last packet which is partly sent.
130  *
131  * @note This call is thread-safe.
132  */
133  void clearOutboundQueue(bool removeFragmentedPacket = false);
134 
135  /**
136  * Returns Session's state.
137  *
138  * @note This call is thread-safe.
139  */
140  SessionState::Enum state() const;
141 
142  /**
143  * Returns the current encryption method.
144  *
145  * @note This call is thread-safe.
146  */
147  EncryptionMethod::Enum encryptionMethod() const;
148 
149  /**
150  * Sets the encryption method.
151  *
152  * @note This call is thread-safe.
153  */
154  void encryptionMethod(EncryptionMethod::Enum newEncryptionMethod);
155 
156  /**
157  * Returns the port to listen on for incoming FIX Connections in Acceptor mode.
158  *
159  * @note This call is thread-safe.
160  */
161  int listenPort() const;
162 
163  /**
164  * Sets the port to listen on for incoming FIX Connections in Acceptor mode.
165  *
166  * @note This call is thread-safe.
167  */
168  void listenPort(int listenPort);
169 
170  /**
171  * Returns the local network interface from which you intend to send and receive data.
172  *
173  * @note This call is thread-safe.
174  */
175  std::string localNetworkInterface() const;
176 
177  /**
178  * Sets the local network interface from which you intend to send and receive data.
179  *
180  * @note This call is thread-safe.
181  */
182  void localNetworkInterface(const std::string & localNetworkInterface);
183 
184  /**
185  * Returns the local port from which you intend to send and receive data.
186  *
187  * @note This call is thread-safe.
188  */
189  unsigned short localPort() const;
190  /**
191  * Local port range type.
192  */
193  typedef std::pair<unsigned short, unsigned short> LocalPortRange;
194 
195  /**
196  * Returns the local port range, the first available port from this range will be used to send and receive data.
197  *
198  * @note This call is thread-safe.
199  */
200  LocalPortRange localPortRange() const;
201 
202  /**
203  * Sets the local port range, the first available port from this range will be used to send and receive data.
204  *
205  * @note This call is thread-safe.
206  */
207  void localPortRange(LocalPortRange portRange);
208 
209  /**
210  * Returns option to improve latency at the expense of message throughput (TCP_NODELAY socket option).
211  * By default, the corresponding option value of Engine settings is used (true).
212  */
213  bool tcpNoDelayOption() const;
214 
215  /**
216  * Sets value of option to improve latency at the expense of message throughput (TCP_NODELAY socket option).
217  */
218  void tcpNoDelayOption(bool improveLatency = true);
219 
220  /**
221  * Returns option which controls whether to send the logout message before
222  * dropping the telecommunication link, in case of exception.
223  * By default, the corresponding option value of Engine settings is used (false).
224  */
225  bool sendLogoutOnException() const;
226 
227  /**
228  * Sets value of option which controls whether to send the logout message before
229  * dropping the telecommunication link, in case of exception.
230  */
231  void sendLogoutOnException(bool sendLogoutOnException);
232 
233  /**
234  * Returns option to validate the presence of unknown FIX messages.
235  * By default, the corresponding option value of Engine settings is used (false).
236  */
237  bool validateUnknownMessages() const;
238 
239  /**
240  * Sets option to validate the presence of unknown FIX messages.
241  */
242  void validateUnknownMessages(bool);
243 
244  /**
245  * Returns option to validate the presence of unknown fields.
246  * By default, the corresponding option value of Engine settings is used (false).
247  */
248  bool validateUnknownFields() const;
249 
250  /**
251  * Sets option to validate the presence of unknown fields.
252  */
253  void validateUnknownFields(bool);
254 
255  /**
256  * Returns option to validate the presence of required fields in inbound and outbound messages.
257  * By default, the corresponding option value of Engine settings is used (false).
258  */
259  bool validateRequiredFields() const;
260 
261  /**
262  * Sets option to validate the presence of required fields in inbound and outbound messages.
263  */
264  void validateRequiredFields(bool);
265 
266  /**
267  * Returns option to validate the field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
268  * By default, the corresponding option value of Engine settings is used (false).
269  */
270  bool validateFieldValues() const;
271 
272  /**
273  * Sets option to validate the field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
274  */
275  void validateFieldValues(bool);
276 
277  /**
278  * Returns option to validate the empty field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
279  * By default, the corresponding option value of Engine settings is used (false).
280  */
281  bool validateEmptyFieldValues() const;
282 
283  /**
284  * Sets option to validate the empty field values of FIX messages in accordance with the FIX protocol or its FIX Dictionary.
285  */
286  void validateEmptyFieldValues(bool);
287 
288  /**
289  * Returns option which controls repeating group entry count validation.
290  * By default, the corresponding option value of Engine settings is used (true).
291  */
292  bool validateRepeatingGroupEntryCount() const;
293 
294  /**
295  * Sets value of option which controls repeating group entry count validation.
296  */
297  void validateRepeatingGroupEntryCount(bool value);
298 
299  /**
300  * Returns option which controls repeating group leading tag validation.
301  * By default, the corresponding option value of Engine settings is used (false).
302  */
303  bool validateRepeatingGroupLeadingTag() const;
304 
305  /**
306  * Sets value of option which controls repeating group leading tag validation.
307  */
308  void validateRepeatingGroupLeadingTag(bool value);
309 
310  /**
311  * Returns option which controls duplicated field validation.
312  * By default, the corresponding option value of Engine settings is used (false).
313  */
314  bool validateDuplicatedField() const;
315 
316  /**
317  * Sets value of option which controls duplicated field validation.
318  */
319  void validateDuplicatedField(bool value);
320 
321  /**
322  * Returns the number of messages that should be written to the outgoing TCP buffer together.
323  * By default, the corresponding option value of Engine settings is used (0).
324  */
325  unsigned messageGrouping() const;
326 
327  /**
328  * Sets the number of messages that should be written to the outgoing TCP buffer together.
329  */
330  void messageGrouping(unsigned numberOfMessagesToGroup);
331 
332  /**
333  * Returns the connection mode.
334  */
335  ConnectionMode::Enum connectionMode() const;
336 
337  /**
338  * Sets the connection mode.
339  */
340  void connectionMode(ConnectionMode::Enum value);
341 
342  /**
343  * Returns the reasonable transmission time as % from heartbeatIntervalSec value.
344  * By default, the corresponding option value of Engine settings is used (20%).
345  */
346  int reasonableTransmissionTime() const;
347 
348  /**
349  * Sets the reasonable transmission time as % from heartbeatIntervalSec value.
350  *
351  * When either end of the connection has not received any data for (heartbeatIntervalSec() * (100 + reasonableTransmissionTime())/100) seconds,
352  * it will transmit a Test Request message.
353  *
354  * If there is still no Heartbeat message received after (heartbeatIntervalSec * (100 + reasonableTransmissionTime())/100) seconds
355  * then the connection should be considered lost and corrective action be initiated.
356  */
357  void reasonableTransmissionTime(int value);
358 
359  /**
360  * Sets the number of attempts to restore the telecommunication link.
361  */
362  void reconnectAttempts(int value);
363 
364  /**
365  * Returns the number of attempts to restore the telecommunication link.
366  * By default, the corresponding option value of Engine settings is used (3).
367  */
368  int reconnectAttempts() const;
369 
370  /**
371  * Sets the time interval between the attempts to restore the telecommunication link (in seconds).
372  */
373  void reconnectInterval(int value);
374 
375  /**
376  * Returns the time interval between the attempts to restore the telecommunication link (in seconds).
377  * By default, the corresponding option value of Engine settings is used (180).
378  */
379  int reconnectInterval() const;
380 
381  /**
382  * Sets the non-blocking receive spinning timeout (in microseconds) before the receiving thread enters into the blocking wait mode.
383  *
384  * @note Should not be greater than 1 sec (minimal heartbeatIntervalSec()).
385  */
386  void receiveSpinningTimeoutUsec(int usec);
387 
388  /**
389  * Returns the current receive spinning timeout value (in microseconds).
390  * By default, the value is zero and receive spinning is not used.
391  */
392  int receiveSpinningTimeout() const;
393 
394  /**
395  * Sets the send spinning timeout (in microseconds) of the Session::send(..) method to wait for the socket sending buffer availability
396  * in the spin loop mode before placing the message to the outgoing queue (to be sent later by the sending thread).
397  *
398  * @note Should not be greater than 1 sec (minimal heartbeatIntervalSec()).
399  */
400  void sendSpinningTimeoutUsec(int usec);
401 
402  /**
403  * Returns the current send spinning timeout value (in microseconds).
404  * By default, the value is zero and send spinning is not used.
405  */
406  int sendSpinningTimeout() const;
407 
408  /**
409  * Sets NextExpectedMsgSeqNum field (tag 789) support in Logon messages.
410  */
411  void supportNextExpectedMsgSeqNum(bool support);
412 
413  /**
414  * Returns 'true' if NextExpectedMsgSeqNum field (tag 789) is supported in Logon messages, otherwise - 'false'.
415  * By default, the option value is false.
416  */
417  bool supportNextExpectedMsgSeqNum() const;
418 
419  /**
420  * Returns the SSL certificate file.
421  *
422  * @note This call is thread-safe.
423  */
424  std::string sslCertificateFile() const;
425 
426  /**
427  * Sets the SSL certificate file.
428  *
429  * @note Only the (Privacy Enhanced Mail) Base 64 Encoded (.pem) SSL certificates are supported.
430  *
431  * @note This call is thread-safe.
432  */
433  void sslCertificateFile(const std::string & file);
434 
435  /**
436  * Returns the SSL private key file.
437  *
438  * @note This call is thread-safe.
439  */
440  std::string sslPrivateKeyFile() const;
441 
442  /**
443  * Sets the SSL private key file.
444  *
445  * @note Only the (Privacy Enhanced Mail) Base 64 Encoded (.pem) SSL certificates are supported.
446  *
447  * @note This call is thread-safe.
448  */
449  void sslPrivateKeyFile(const std::string & file);
450 
451  /**
452  * Returns the SSL private key file password.
453  *
454  * @note This call is thread-safe.
455  */
456  std::string sslPrivateKeyPassword() const;
457 
458  /**
459  * Sets the SSL private key file password.
460  *
461  * @note This call is thread-safe.
462  */
463  void sslPrivateKeyPassword(const std::string & password);
464 
465  /**
466  * Set option to request peer certificates and perform the certificate verification.
467  *
468  * @note This call is thread-safe.
469  */
470  void sslVerifyPeer(bool verify);
471 
472  /**
473  * Returns option to request peer certificates and perform the certificate verification.
474  * By default, the corresponding option value of Engine settings is used (false).
475  *
476  * @note This call is thread-safe.
477  */
478  bool sslVerifyPeer() const;
479 
480  /**
481  * Sets the path to the trusted certification authority certificate file in (Privacy Enhanced Mail) Base64 encoded (.pem) format.
482  *
483  * @note This call is thread-safe.
484  */
485  void sslCaFile(const std::string & value);
486 
487  /**
488  * Returns the path to trusted certification authority certificate file in (Privacy Enhanced Mail) Base64 encoded (.pem) format.
489  *
490  * @note This call is thread-safe.
491  */
492  std::string sslCaFile() const;
493 
494  /**
495  * Establishes the FIX Connection as Acceptor.
496  *
497  * Acceptor is the receiving party of the FIX session. It listens for the incoming connection on the pre-defined port.
498  * The acceptor has responsibility to perform first level authentication and formally declare
499  * the connection request "accepted" through transmission of an acknowledgment Logon message.
500  *
501  * @note This call is thread-safe.
502  */
503  void logonAsAcceptor();
504 
505  /**
506  * Establishes FIX Connection as Initiator using the ResetSeqNumFlag (tag 141) field.
507  *
508  * Initiator establishes the telecommunications link and initiates the session via transmission
509  * of the initial Logon message.
510  * The method is blocked until the acknowledgment Logon message is received or the timeout expired.
511  * The timeout value is equal to the triple heartbeat interval.
512  *
513  * @note This call is thread-safe.
514  */
515  void logonAsInitiator(const std::string & host, int port, bool setResetSeqNumFlag);
516 
517  /**
518  * Establishes FIX Connection as Initiator.
519  *
520  * Initiator establishes the telecommunications link and initiates the session via transmission
521  * of the initial Logon message.
522  * The method is blocked until the acknowledgment Logon message is received or the timeout expired.
523  * The timeout value is equal to the triple heartbeat interval.
524  *
525  * @note This call is thread-safe.
526  */
527  void logonAsInitiator(const std::string & host, int port);
528 
529  /**
530  * Establishes FIX Connection as Initiator using the given Heartbeat interval (seconds).
531  * The method is blocked until the acknowledgment Logon message is received or the timeout expired.
532  * The timeout value is equal to the triple heartbeat interval.
533  *
534  * @note This call is thread-safe.
535  */
536  void logonAsInitiator(const std::string & host, int port, int heartbeatIntervalSec);
537 
538  /**
539  * Establishes FIX Connection as Initiator using the given Heartbeat interval (seconds) and the ResetSeqNumFlag(141) field.
540  * The method is blocked until the acknowledgment Logon message is received or the timeout expired.
541  * The timeout value is equal to the triple heartbeat interval.
542  *
543  * @note This call is thread-safe.
544  */
545  void logonAsInitiator(const std::string & host, int port, int heartbeatIntervalSec, bool setResetSeqNumFlag);
546 
547  /**
548  * Establishes FIX Connection as Initiator using the custom Logon message.
549  * The method is blocked until the acknowledgment Logon message is received or the timeout expired.
550  * The timeout value is equal to the triple heartbeat interval.
551  *
552  * @note This call is thread-safe.
553  */
554  void logonAsInitiator(const std::string & host, int port, int heartbeatIntervalSec, Message * customLogonMsg);
555 
556  /**
557  * Establishes FIX Connection as Initiator using the custom Logon message and the ResetSeqNumFlag(141) field.
558  * The method is blocked until the acknowledgment Logon message is received or the timeout expired.
559  * The timeout value is equal to the triple heartbeat interval.
560  *
561  * @note This call is thread-safe.
562  */
563  void logonAsInitiator(const std::string & host, int port, int heartbeatIntervalSec, Message * customLogonMsg, bool setResetSeqNumFlag);
564 
565  /**
566  * Establishes FIX Connection asynchronously as Initiator using the custom Logon message and the ResetSeqNumFlag(141) field.
567  * The method returns immediately without waiting the acknowledgment Logon message.
568  * Returns the `SharedFuture` object that can be used to wait for the result of the asynchronous logon method.
569  *
570  * @note This call is thread-safe.
571  */
572  Threading::SharedFuture logonAsInitiatorAsync(const std::string & host, int port, int heartbeatIntervalSec, Message * customLogonMsg, bool setResetSeqNumFlag);
573 
574  /**
575  * Terminates the FIX Connection.
576  *
577  * The initial Logout message is sent to the counterparty and the method is blocked until the acknowledgment
578  * Logout message is received or the timeout expired.
579  * The timeout value is equal to the triple heartbeat interval or,
580  * in case there are no incoming messages, heartbeat interval plus reasonable transmission time.
581  *
582  * @note This call is thread-safe.
583  */
584  void logout();
585 
586  /**
587  * Terminates the FIX Connection.
588  *
589  * The initial Logout message is sent to the counterparty and the method is blocked until the acknowledgment
590  * Logout message is received or the timeout expired.
591  * The timeout value is equal to the triple heartbeat interval or,
592  * in case there are no incoming messages, heartbeat interval plus reasonable transmission time.
593  *
594  * @param text Free format text string that is sent to the counterparty in the Text(58) field of the initial
595  * Logout message.
596  *
597  * @note This call is thread-safe.
598  */
599  void logout(const std::string & text);
600 
601  /**
602  * Terminates the FIX Connection.
603  *
604  * The initial Logout message is sent to the counterparty and the method returns immediately
605  * without waiting the acknowledgment Logout message.
606  * Returns the `SharedFuture` object that can be used to wait for the result of the asynchronous logout method.
607  *
608  * @param text Free format text string that is sent to the counterparty in the Text(58) field of the initial
609  * Logout message.
610  *
611  * @note This call is thread-safe.
612  */
613  Threading::SharedFuture logoutAsync(const std::string & text);
614 
615  /**
616  * Terminates the FIX Connection.
617  *
618  * The initial Logout message is sent to the counterparty and the method is blocked until the acknowledgment
619  * Logout message is received or the timeout expired.
620  * The timeout value is equal to the triple heartbeat interval or,
621  * in case there are no incoming messages, heartbeat interval plus reasonable transmission time.
622  *
623  * @param customLogoutMessage Custom Logout message that is sent to the counterparty.
624  *
625  * @note This call is thread-safe.
626  */
627  void logout(Message * customLogoutMessage);
628  void logout(OnixS::FIX::Core::Messaging::Extras::SerializedMessage * customLogoutMessage);
629 
630  /**
631  * Terminates the FIX Connection.
632  *
633  * The initial Logout message is sent to the counterparty and the method returns immediately
634  * without waiting the acknowledgment Logout message.
635  * Returns the `SharedFuture` object that can be used to wait for the result of the asynchronous logout method.
636  *
637  * @param customLogoutMessage Custom Logout message that is sent to the counterparty.
638  *
639  * @note This call is thread-safe.
640  */
641  Threading::SharedFuture logoutAsync(Message * customLogoutMessage);
642  Threading::SharedFuture logoutAsync(OnixS::FIX::Core::Messaging::Extras::SerializedMessage * customLogoutMessage);
643 
644  /**
645  * Terminates the FIX connection in the non-graceful way (without the exchange of Logout (MsgType=5) messages).
646  *
647  * @note This call is thread-safe.
648  */
649  void breakConnection();
650 
651  /**
652  * Sends the message to the counterparty.
653  *
654  * As soon as a session is created, it is possible to start sending messages via the session.
655  * If the session is not established, the messages are stored in the session storage and will be sent in replay to the resend request
656  * when the connection is established with the counterparty and the sequence numbers mismatch is detected.
657  *
658  * @note This call is asynchronous.
659  *
660  * @note This call is thread-safe.
661  */
662  void send(Message * msg);
663  void send(OnixS::FIX::SerializedMessage * msg);
664 
665  /**
666  * Performs sending via a specific API (e.g. zero-copy send) of the message to the counterparty.
667  *
668  * As soon as a session is created, it is possible to start sending messages via the session.
669  * If the session is not established, the messages are stored in the session storage and will be sent in replay to the resend request
670  * when the connection is established with the counterparty and the sequence numbers mismatch is detected.
671  *
672  * @note This call is asynchronous.
673  *
674  * @note This call is thread-safe.
675  */
677 
678  /**
679  * Message batch types.
680  */
681  typedef std::vector<Message *> MessageBatch;
682  typedef std::vector<OnixS::FIX::SerializedMessage *> SerializedMessageBatch;
683  /**
684  * Sends messages in a batch to the counterparty.
685  *
686  * As soon as a session is created, it is possible to start sending messages via the session.
687  * If the session is not established, the messages are stored in the session storage and will be sent in replay to the resend request
688  * when the connection is established with the counterparty and the sequence numbers mismatch is detected.
689  *
690  * @note This call is asynchronous.
691  *
692  * @note This call is thread-safe.
693  */
694  void send(const MessageBatch & msgs);
695  void send(const SerializedMessageBatch & msgs);
696 
697  /**
698  * Sends serialized message(s) to the counterparty without any fields updating.
699  * One can use the preFill method to prepare message(s) for sending.
700  *
701  * As soon as a session is created, it is possible to start sending messages via the session.
702  * If the session is not established, the messages are stored in the session storage and will be sent in replay to the resend request
703  * when the connection is established with the counterparty and the sequence numbers mismatch is detected.
704  *
705  * @note This call is asynchronous.
706  *
707  * @note This call is thread-safe.
708  */
709  void sendAsIs(OnixS::FIX::SerializedMessage * msg);
710  void sendAsIs(const SerializedMessageBatch & msgs);
711 
712  /**
713  * Performs throttling of a session that must be called before each of a send function call.
714  * If the count of messages per a time unit exceeds a throttling limit, the function will be blocked until the given time interval is passed.
715  *
716  * @note This call is thread-safe.
717  */
718  void throttle();
719 
720  /**
721  * Sets throttling limit parameters.
722  *
723  *@param messagesCount Message limit per a time unit.
724  *@param intervalInMs Time interval to limit messages.
725  *
726  * @note This call is thread-safe.
727  */
728  void throttlingLimit(size_t messagesCount, size_t intervalInMs = 1000);
729 
730  /**
731  * This method warms up the sending path.
732  *
733  *@param msg Message to warm up the assembly part of the sending path.
734  *@param warmupFlags Specific flags which can be used to turn on the warmup feature for a specific NIC.
735 
736  * @note This call is thread-safe.
737  */
738  void warmUp(OnixS::FIX::SerializedMessage* msg, int warmupFlags = 0);
739 
740  /**
741  * Returns 'true' if given flags work as expected and a real data is not sent to the wire, otherwise - 'false'.
742  *
743  *@param warmupFlags Warmup flags for checking.
744  *@param baseListenPort Base listen port to use during the checking.
745  *@param localNetworkInterface IP address to bind for listen and outgoing test sockets.
746  *
747  * @note This call is thread-safe.
748  */
749  static bool checkWarmupFlags(int warmupFlags, unsigned short baseListenPort = 5000, const std::string & localNetworkInterface = "127.0.0.1");
750 
751  /**
752  * Pre-fills session-level fields that are constant during the session's lifetime - SenderCompId, TargetCompId, SenderLocationId, TargetLocationID, SenderSubID, TargetSubID.
753  *
754  * @note This call is thread-safe.
755  */
756  void preFill(Message & msg) const;
757 
758  /**
759  * Pre-fills the following fields in the message or messages batch for sending as is:
760  * - Session-level fields that are constant during the session's lifetime - SenderCompId, TargetCompId, SenderLocationId, TargetLocationI, SenderSubID, TargetSubID.
761  * - MsgSeqNum field in accordance with the session outgoing sequence number.
762  * - SendingTime field.
763  * - BodyLength and CheckSum fields.
764  *
765  * @note This call is thread-safe.
766  */
767  void preFill(OnixS::FIX::SerializedMessage & msg) const;
768  void preFill(SerializedMessageBatch & msgs) const;
769 
770  /**
771  * Shutdowns the session.
772  *
773  * @note This call is thread-safe.
774  */
775  void shutdown();
776 
777  /**
778  * Returns the text description of this session.
779  *
780  * @note This call is thread-safe.
781  */
782  operator const std::string & () const;
783 
784  /**
785  * Returns the underlying storage Id.
786  *
787  * @note This call is thread-safe.
788  */
789  const std::string & storageId() const;
790 
791  /**
792  * Flushes all internal buffers of the underlying storage.
793  *
794  * @note This call is thread-safe.
795  */
796  void flushSessionStorage();
797 
798  /**
799  * Returns the counterparty host name.
800  *
801  * @note This call is thread-safe.
802  */
803  std::string counterpartyHost() const;
804 
805  /**
806  * Returns the counterparty address.
807  *
808  * @note This call is thread-safe.
809  */
810  std::string counterpartyIpAddress() const;
811 
812  /**
813  * Returns the counterparty port number.
814  *
815  * @note This call is thread-safe.
816  */
817  size_t counterpartyPort() const;
818 
819  /**
820  * Returns Session's Custom Key.
821  *
822  * @note This call is thread-safe.
823  */
824  const std::string & customKey() const;
825 
826  /**
827  * Returns the total number of bytes in the outbound queue.
828  *
829  * @note This call is thread-safe.
830  */
831  size_t outboundQueueBytes() const;
832 
833  /**
834  * Returns the Heartbeat interval (in seconds).
835  */
836  int heartbeatIntervalSec() const;
837 
838  /**
839  * Returns 'true' if inbound messages are logged, otherwise - 'false'.
840  * By default, the value is 'true'.
841  */
842  bool logInboundMessages() const;
843 
844  /**
845  * Option to log inbound messages.
846  */
847  void logInboundMessages(bool value);
848 
849  /**
850  * Returns 'true' if outbound messages are logged, otherwise - 'false'.
851  * By default, the value is 'true'.
852  */
853  bool logOutboundMessages() const;
854 
855  /**
856  * Option to log outbound messages.
857  */
858  void logOutboundMessages(bool value);
859 
860  /**
861  * Incoming message types to be filtered out from the logs.
862  */
863  typedef std::set<std::string> InboundMessageLogFilter;
864 
865  /**
866  * Returns incoming message types to be filtered out from the logs.
867  *
868  * @note This call is thread-safe.
869  */
870  InboundMessageLogFilter inboundMessageLogFilter() const;
871 
872  /**
873  * Sets incoming message types to be filtered out from the logs.
874  *
875  * @note This call is thread-safe.
876  */
877  void inboundMessageLogFilter(const InboundMessageLogFilter & filter);
878 
879  /**
880  * Outgoing message types to be filtered out from the logs.
881  */
882  typedef std::set<std::string> OutboundMessageLogFilter;
883 
884  /**
885  * Returns outgoing message types to be filtered out from the logs.
886  *
887  * @note This call is thread-safe.
888  */
889  OutboundMessageLogFilter outboundMessageLogFilter() const;
890 
891  /**
892  * Sets outgoing message types to be filtered out from the logs.
893  *
894  * @note This call is thread-safe.
895  */
896  void outboundMessageLogFilter(const OutboundMessageLogFilter & filter);
897 
898  /**
899  * Returns 'true' if outbound messages are logged before sending, otherwise - 'false'.
900  * By default, the value is 'true'.
901  *
902  * @note This call is thread-safe.
903  */
904  bool logBeforeSending() const;
905 
906  /**
907  * Option to switch on/off logging of outbound messages before/after sending.
908  *
909  * @note This call is thread-safe.
910  */
911  void logBeforeSending(bool value);
912 
913  /**
914  * Returns the expected sequence number of the next incoming message.
915  *
916  * @note This call is thread-safe.
917  */
918  SequenceNumber inSeqNum() const;
919 
920  /**
921  * Sets the expected sequence number of the next incoming message.
922  *
923  * @note This call is thread-safe.
924  */
925  void inSeqNum(SequenceNumber seqNum);
926 
927  /**
928  * Returns the sequence number of the next outgoing message.
929  *
930  * @note This call is thread-safe.
931  */
932  SequenceNumber outSeqNum() const;
933 
934  /**
935  * Sets the sequence number of the next outgoing message.
936  *
937  * @note This call is thread-safe.
938  */
939  void outSeqNum(SequenceNumber seqNum);
940 
941  /**
942  * Represents unlimited number of messages to be requested in one Resend Request (MsgType=2) message.
943  * Default value is 0.
944  */
945  static const unsigned int ResendRequestMaximumRangeNoLimit;
946 
947  /**
948  * Sets the maximum number of messages to be requested in one Resend Request (MsgType=2) message.
949  *
950  * @see Session::ResendRequestMaximumRangeNoLimit.
951  *
952  * @param range Maximum number of messages to be requested in one Resend Request (MsgType=2) message. Cannot be negative.
953  *
954  * @note This call is thread-safe.
955  */
956  void resendRequestMaximumRange(int range);
957 
958  /**
959  * Returns the maximum number of messages to be requested in one Resend Request (MsgType=2) message.
960  * By default, the value is zero (no limit).
961  *
962  * @see Session::ResendRequestMaximumRangeNoLimit.
963  *
964  * @note This call is thread-safe.
965  */
966  int resendRequestMaximumRange() const;
967 
968  /**
969  * Sets the number of sent messages that are available for resending on counterparty's Resend Request <2> message.
970  *
971  * @note This call is thread-safe.
972  */
973  void resendingQueueSize(int value);
974 
975  /**
976  * Returns the number of sent messages that are available for resending on counterparty's Resend Request <2> message.
977  * By default value is -1 that means that the corresponding option value of Engine settings is used (1000 by default).
978  *
979  * @note This call is thread-safe.
980  */
981  int resendingQueueSize() const;
982 
983  /**
984  * Returns the session role.
985  *
986  * @note This call is thread-safe.
987  */
988  SessionRole::Enum role() const;
989 
990  /**
991  * Returns the assigned value used to identify firm sending message (the SenderCompID (tag 49) field value in outgoing messages).
992  *
993  * @note This call is thread-safe.
994  */
995  const std::string & senderCompId() const;
996 
997  /**
998  * Returns 'true' if the LastMsgSeqNumProcessed (tag 369) field is specified on every message sent, otherwise - 'false'.
999  * By default, the option value is false.
1000  */
1001  bool specifyLastMsgSeqNumProcessed() const;
1002 
1003  /**
1004  * Option to specify the LastMsgSeqNumProcessed (tag 369) field on every message sent.
1005  * Useful for detecting a backlog with a counterparty.
1006  *
1007  * @note Option does not affect the SerializedMessage send.
1008  */
1009  void specifyLastMsgSeqNumProcessed(bool specify);
1010 
1011  /**
1012  * Returns 'true' if updating of SendingTime is turn on for every message, otherwise - 'false'.
1013  * By default, the option value is true.
1014  */
1015  bool updateSendingTimeField() const;
1016 
1017  /**
1018  * Option to specify updating of SendingTime of every sent message.
1019  */
1020  void updateSendingTimeField(bool specify);
1021 
1022  /**
1023  * Sets the time format of SendingTime of every sent message.
1024  * By default, the YYYYMMDDHHMMSSMsec format is used.
1025  */
1026  void sendingTimeFormat(TimestampFormat::Enum format);
1027 
1028  /**
1029  * Returns the Assigned value used to identify receiving firm (the TargetCompID (tag 56) field value in outgoing messages).
1030  *
1031  * @note This call is thread-safe.
1032  */
1033  const std::string & targetCompId() const;
1034 
1035  /**
1036  * Instance of the FIX dictionary or standard FIX messages dictionary which is used by the session.
1037  */
1038  Dictionary dictionary() const;
1039 
1040  /**
1041  * Returns the CPU affinity of the receiving thread.
1042  */
1043  const OnixS::Threading::CpuIndexes & receivingThreadAffinity() const;
1044 
1045  /**
1046  * Sets the CPU affinity of the receiving thread.
1047  */
1048  void receivingThreadAffinity(const OnixS::Threading::CpuIndexes & cpuIndexes);
1049 
1050  /**
1051  * Sets the CPU affinity of the receiving thread to a CPU.
1052  */
1053  void receivingThreadAffinity(const OnixS::Threading::CpuIndex cpuIndex);
1054 
1055  /**
1056  * Returns the CPU affinity of the sending thread.
1057  */
1058  const OnixS::Threading::CpuIndexes & sendingThreadAffinity() const;
1059 
1060  /**
1061  * Sets the CPU affinity index of the sending thread.
1062  */
1063  void sendingThreadAffinity(const OnixS::Threading::CpuIndexes & cpuIndexes);
1064 
1065  /**
1066  * Sets the CPU affinity index of the sending thread a CPU.
1067  */
1068  void sendingThreadAffinity(const OnixS::Threading::CpuIndex cpuIndex);
1069 
1070  /**
1071  * Represents undefined value of priority and policy.
1072  */
1073  static const int UndefinedPriorityAndPolicy;
1074 
1075  /**
1076  * Returns the priority of the receiving thread.
1077  */
1078  int receivingThreadPriority() const;
1079 
1080  /**
1081  * Sets the priority of the receiving thread.
1082  */
1083  void receivingThreadPriority(int priority);
1084 
1085  /**
1086  * Returns the priority of the sending thread.
1087  */
1088  int sendingThreadPriority() const;
1089 
1090  /**
1091  * Sets the priority of the sending thread.
1092  */
1093  void sendingThreadPriority(int priority);
1094 
1095  /**
1096  * Returns the scheduling policy of the receiving thread.
1097  */
1098  int receivingThreadPolicy() const;
1099 
1100  /**
1101  * Sets the scheduling policy of the receiving thread.
1102  */
1103  void receivingThreadPolicy(int policy);
1104 
1105  /**
1106  * Returns the scheduling policy of the sending thread.
1107  */
1108  int sendingThreadPolicy() const;
1109 
1110  /**
1111  * Sets the scheduling policy of the sending thread.
1112  */
1113  void sendingThreadPolicy(int policy);
1114 
1115  /**
1116  * Returns the sent message if it can be found by the given message sequence number, otherwise - NULL.
1117  *
1118  * @note This call is thread-safe.
1119  */
1120  Message * findSentMessage(SequenceNumber messageSequenceNumber);
1121 
1122 
1123  /**
1124  * When the message gap is detected the "Resend Request" FIX Message is sent and Session state is changed to "AwaitReplyOnResendRequest".
1125  * By default in this state the incoming new messages (without the PossDupFlag (tag #43) flag) are ignored because we expect them to be re-sent later again with the PossDupFlag flag.
1126  *
1127  * This property allows to change this behavior and report the new messages anyway.
1128  *
1129  * @note In this mode messages could be reported out of the original order: e.g. MsgSeqNum could be: 3 (original), 4 (original), 2 (PossDupFlag='Y'), 3 (PossDupFlag='Y'), 4 (PossDupFlag='Y')
1130  * and some messages could be received two times: first time without PossDupFlag='Y' and second time - with this flag.
1131  */
1132  void reportNewMessagesWhileWaitingForMissedMessages(bool report);
1133 
1134  /**
1135  * Returns 'true' if the new messages are reported even when the message gap is detected and the reply on the "Resend Request" message is expected, otherwise - 'false'.
1136  */
1137  bool reportNewMessagesWhileWaitingForMissedMessages() const;
1138 
1139  /**
1140  * By default the "Resend Request" message is sent only once - when the first gap is detected.
1141  * This property allows to change this behavior and send the "Resend Request" message on each detected message sequence number gap.
1142  */
1143  void sendResendRequestOnEachMessageGap(bool send);
1144 
1145  /**
1146  * Returns 'true' if the "Resend Request" message is sent on each detected message sequence number gap, otherwise - 'false'.
1147  */
1148  bool sendResendRequestOnEachMessageGap() const;
1149 
1150  /**
1151  * By default the "Resend Request" message requests all messages begin from the first missed one.
1152  * This property allows to change this behavior and request only missed messages.
1153  *
1154  * @note This method can be called only when the session is disconnected.
1155  */
1156  void requestOnlyMissedMessages(bool request);
1157 
1158  /**
1159  * Returns 'true' if the "Resend Request" message requests only missed messages, otherwise - 'false'.
1160  */
1161  bool requestOnlyMissedMessages() const;
1162 
1163  /**
1164  * By default if the "Session Level Reject" message is received in replay to the "Resend Request" then this is considered as a serious problem and the FIX connection will be closed.
1165  * This property allows to change this behavior and consider the "Session Level Reject" on the "Resend Request" as the "Sequence Reset Gap Fill" message.
1166  */
1167  void considerRejectOnResendRequestAsGapFill(bool consider);
1168 
1169  /**
1170  * Returns 'true' if the "Reject" on the "Resend Request" is considered as the "Sequence Reset Gap Fill" message, otherwise - 'false'.
1171  */
1172  bool considerRejectOnResendRequestAsGapFill() const;
1173 
1174  /**
1175  * By default if the incoming message has a sequence number less than expected and the PossDupFlag is not set, it indicates
1176  * a serious error and leads to FIX connection closing.
1177  * This property allows to change this behavior and consider the sequence number of the incoming message, which less than expected, as an expected one.
1178  */
1179  void ignoreLessThanExpectedSequenceNumber(bool ignore);
1180 
1181  /**
1182  * Returns 'true' if the sequence number of the incoming message, which less than expected, is considered as an expected one, otherwise - 'false'.
1183  */
1184  bool ignoreLessThanExpectedSequenceNumber() const;
1185 
1186  /**
1187  * Option to automatically reset the local sequence numbers to 1 during every logon.
1188  */
1189  void resetLocalSequenceNumbersOnLogon(bool reset);
1190 
1191  /**
1192  * Returns 'true' if local sequence numbers are reset automatically to 1 during every logon, otherwise - 'false'.
1193  */
1194  bool resetLocalSequenceNumbersOnLogon() const;
1195 
1196  /**
1197  * If requestOnlyMissedMessages option is true and the sequence number of an incoming FIX message
1198  * greater that expected then the resend functionality is run and this incoming message is stored
1199  * in the incoming message gap queue for further processing.
1200  * This property allows to set maximum size of that queue.
1201  */
1202  void incomingMessageGapQueueMaximumSize(size_t maxSize);
1203 
1204  /**
1205  * Returns maximum size of the incoming message gap queue.
1206  * By default, the value equal to 1000.
1207  */
1208  size_t incomingMessageGapQueueMaximumSize() const;
1209 
1210  /**
1211  * Registers the Session listener.
1212  *
1213  * @throw Exception if the listener is already registered.
1214  */
1215  void registerListener(ISessionListener * listener);
1216 
1217  /**
1218  * Un-registers the Session listener.
1219  */
1220  void unregisterListener(ISessionListener * listener);
1221 
1222  /**
1223  * Un-registers all Session listener.
1224  */
1225  void unregisterAllListeners();
1226 
1227  /**
1228  * Backups the current log files and resets the local sequence numbers to 1.
1229  *
1230  * @note This method can be called only when the session is disconnected.
1231  *
1232  * @note This call is thread-safe.
1233  */
1234  void resetLocalSequenceNumbers();
1235 
1236  /**
1237  * Sends a Logon message with the ResetSeqNumFlag set.
1238  *
1239  * @note This call is thread-safe.
1240  */
1241  void resetSeqNumViaLogonExchange();
1242 
1243  /**
1244  * Returns the SenderSubID (tag 50) field values for all outgoing messages.
1245  *
1246  * @note This call is thread-safe.
1247  */
1248  std::string senderSubId() const;
1249 
1250  /**
1251  * Sets the SenderSubID (tag 50) field values for all outgoing messages.
1252  *
1253  * @note This call is thread-safe.
1254  */
1255  void senderSubId(const std::string & value);
1256 
1257  /**
1258  * Returns the TargetSubID (tag 57) field values for all outgoing messages.
1259  *
1260  * @note This call is thread-safe.
1261  */
1262  std::string targetSubId() const;
1263 
1264  /**
1265  * Sets the TargetSubID (tag 57) field values for all outgoing messages.
1266  *
1267  * @note This call is thread-safe.
1268  */
1269  void targetSubId(const std::string & value);
1270 
1271  /**
1272  * Returns the SenderLocationID (tag 142) field values for all outgoing messages.
1273  *
1274  * @note This call is thread-safe.
1275  */
1276  std::string senderLocationId() const;
1277 
1278  /**
1279  * Sets the SenderLocationID (tag 142) field values for all outgoing messages.
1280  *
1281  * @note This call is thread-safe.
1282  */
1283  void senderLocationId(const std::string & value);
1284 
1285  /**
1286  * Returns the TargetLocationID (tag 143) field values for all outgoing messages.
1287  *
1288  * @note This call is thread-safe.
1289  */
1290  std::string targetLocationId() const;
1291 
1292  /**
1293  * Sets the TargetLocationID (tag 143) field values for all outgoing messages.
1294  *
1295  * @note This call is thread-safe.
1296  */
1297  void targetLocationId(const std::string & value);
1298 
1299  /**
1300  * Options to turn on/off incoming message sequence numbers validation.
1301  */
1302  void validateSequenceNumbers(bool value);
1303 
1304  /**
1305  * Returns the current status of incoming message sequence numbers validation.
1306  * By default the option value is true.
1307  */
1308  bool validateSequenceNumbers() const;
1309 
1310  /**
1311  * Returns the thread name suffix for receiving (R:threadNameSuffix) and sending (S:threadNameSuffix) threads.
1312  *
1313  * @note This call is thread-safe.
1314  */
1315  std::string threadNameSuffix() const;
1316 
1317  /**
1318  * Sets the thread name suffix for receiving ("R:threadNameSuffix") and sending ("S:threadNameSuffix") threads.
1319  **
1320  * If threadNameSuffix is not specified, it is set by default to ("R:senderCompId-targetCompId")("S:senderCompId-targetCompId").
1321  **
1322  * @note This method can be called only when the session is disconnected.
1323  * @throw Exception if the session state is not Disconnected.
1324  *
1325  * @note This call is thread-safe.
1326  */
1327  void threadNameSuffix(const std::string & value);
1328 
1329  /**
1330  * Sends the Test Request (MsgType 1) message.
1331  *
1332  * @note This call is thread-safe.
1333  */
1334  void sendTestRequest(const std::string & testReqId = "");
1335 
1336  /**
1337  * Sends the Resend Request (MsgType 2) message.
1338  *
1339  * @note Normally, "Resend Request" message is sent automatically. This method allows to simulate a sequence gap by sending this message manually.
1340  * This can be needed in some venue specific cases. This method should not be used in the normal work.
1341  *
1342  * @param beginSeqNumber Begin sequence number of the first requested message in the range.
1343  *
1344  * @note This call is thread-safe.
1345  */
1346  void sendResendRequest(SequenceNumber beginSeqNumber);
1347 
1348  /**
1349  * Sends the Reject (MsgType 3) message.
1350  *
1351  * @param refSeqNumber MsgSeqNum of rejected message.
1352  * @param text Message to explain the reason for rejection.
1353  *
1354  * @note This call is thread-safe.
1355  */
1356  void sendReject(SequenceNumber refSeqNumber, const std::string & text);
1357 
1358  /**
1359  * Returns the time when logical session was created or last sequence number reset operation was performed.
1360  * Originating value is extracted from attached storage using ISessionStorage::sessionCreationTime() method.
1361  *
1362  * @note This call is thread-safe.
1363  */
1364  Timestamp creationTime() const;
1365 
1366  /**
1367  * Returns the session string presentation.
1368  *
1369  * @note This call is thread-safe.
1370  */
1371  std::string toString() const;
1372 
1373  /**
1374  * Represents invalid value of socket handle.
1375  */
1376  static const OnixS::Sockets::Handle InvalidSocketHandle;
1377 
1378  /**
1379  * Returns the socket handle which the session uses to transmit FIX data.
1380  *
1381  * @note This call is thread-safe.
1382  */
1383  OnixS::Sockets::Handle socketHandle();
1384 
1385  /**
1386  * Additional options, which should be set to the session socket when it is created.
1387  * For initiator sessions, options are set before socket connect(..) call.
1388  * For acceptor sessions, options are set after socket accept(..) call.
1389  */
1390  void socketOptions(const OnixS::Sockets::SocketOptions & options);
1391 
1392  /**
1393  * Inbound and outbound messages, session's state data are stored in this directory.
1394  *
1395  * @note This method can be called only when the session is disconnected.
1396  * @throw Exception if the session state is not Disconnected.
1397  *
1398  * @note This call is thread-safe.
1399  */
1400  void logDirectory(const std::string & value);
1401 
1402  /**
1403  * Inbound and outbound messages, session's state data are stored in this directory.
1404  *
1405  * @note This call is thread-safe.
1406  */
1407  const std::string & logDirectory() const;
1408 
1409  struct Impl; ///< Implementation details.
1410 
1411 private:
1412  void init(
1413  const std::string & senderCompId,
1414  const std::string & targetCompId,
1415  const Dictionary & dictionary,
1416  ISessionListener * listener,
1417  bool keepSequenceNumbersAfterLogout,
1418  SessionStorageType::Enum storageType,
1419  ISessionStorage * storage,
1420  const std::string & customSessionKey);
1421 
1422  Impl * impl_;
1423 
1424  friend class Engine::Impl;
1425 };
1426 
1427 /// Stream output.
1429 std::ostream & operator << (std::ostream & os, const Session & session);
1430 }
1431 }
std::pair< unsigned short, unsigned short > LocalPortRange
Local port range type.
Definition: Session.h:193
unsigned int SequenceNumber
Alias for sequence mumber.
File based storage. Session&#39;s state and messages are persisted to the file system.
Session&#39;s Listener.
static const int UndefinedPriorityAndPolicy
Represents undefined value of priority and policy.
Definition: Session.h:1073
Session&#39;s pluggable storage.
Provides access to FIX fields from a serialized (tag=value) message.
FIX Session - a bi-directional stream of ordered messages between two parties within a continuous seq...
Definition: Session.h:58
Identifies FIX messages dictionary.
Definition: Dictionary.h:79
ONIXS_FIXENGINE_API_DECL(class, IEngineListener)
ONIXS_FIXENGINE_API std::ostream & operator<<(std::ostream &os, const Group &group)
Stream output.
Timestamps related functionality.
Definition: Timestamp.h:91
Represents a future result of an asynchronous operation.
Definition: Future.h:34
std::vector< Message * > MessageBatch
Message batch types.
Definition: Session.h:681
#define ONIXS_FIXENGINE_API
Definition: ABI.h:45
std::set< std::string > OutboundMessageLogFilter
Outgoing message types to be filtered out from the logs.
Definition: Session.h:882
size_t CpuIndex
Logical processors that a thread is allowed to run on (first logical CPU has index 0)...
Definition: Thread.h:31
std::set< std::string > InboundMessageLogFilter
Incoming message types to be filtered out from the logs.
Definition: Session.h:863
static const OnixS::Sockets::Handle InvalidSocketHandle
Represents invalid value of socket handle.
Definition: Session.h:1376
Encapsulates operations over a FIX Message.
Definition: Message.h:49
static const unsigned int ResendRequestMaximumRangeNoLimit
Represents unlimited number of messages to be requested in one Resend Request (MsgType=2) message...
Definition: Session.h:945
std::vector< OnixS::FIX::SerializedMessage * > SerializedMessageBatch
Definition: Session.h:682
std::set< CpuIndex > CpuIndexes
Definition: Thread.h:32