#include <OnixS/FIXEngine/FIX/TcpDirectStack.h>
A high-level wrapper over the TCPDirect stack.
Definition at line 35 of file TcpDirectStack.h.
◆ Stack() [1/3]
Allocates a stack with the supplied attributes.
- Parameters
-
| attr | A set of properties to apply to the stack. |
A stack binds to a single network interface, specified by the interface attribute in attr. *
Relevant attributes to set in attr are those in the zf_stack, zf_pool and zf_vi categories described in the attributes documentation.
- Exceptions
-
| The | std::bad_alloc is thrown in case of out of memory. N.B. Huge pages are required. |
| The | std::runtime_error is thrown if the TCPDirect library reported an error. |
| The | std::exception is thrown if a system call reported an error. |
◆ Stack() [2/3]
◆ Stack() [3/3]
◆ ~Stack()
◆ dispatchEvents()
Processes events on a stack and performs the necessary handling.
These events include transmit and receive events raised by the hardware, and also software events such as TCP and FIX protocol timers.
Please see the "Stack polling" section in the TCPDirect User Guide for further information.
- Note
- After OnixS::FIX::Engine::shutdown() is called, the application may need to continue dispatching events until the stack becomes quiescent.
- Warning
- The event dispatching should be performed from the same thread that created the stack.
Implements ISessionReactor.
Definition at line 74 of file TcpDirectStack.h.
◆ isQuiescent()
| bool isQuiescent |
( |
| ) |
const |
|
inlineoverridevirtual |
- Returns
- a boolean value indicating whether a stack is quiescent.
This can be used to ensure that all connections have been closed gracefully before the destroying of a stack (or exiting the application). The destroying of a stack while it is not quiescent is permitted by the API, but when doing so there is no guarantee that sent data has been acknowledged by the peer or even transmitted, and there is the possibility that peers' connections will be reset.
- Note
- After OnixS::FIX::Engine::shutdown(), the application should continue calling OnixS::FIX::TCPDirect::Stack::dispatchEvents() on the owning thread until this method returns true.
Implements ISessionReactor.
Definition at line 94 of file TcpDirectStack.h.
◆ operator=() [1/2]
◆ operator=() [2/2]
◆ threadId()
Returns the ID of the thread that created the stack.
- Returns
- the ID of the thread that created the stack.
Implements ISessionReactor.
Definition at line 105 of file TcpDirectStack.h.
◆ type()
◆ FIX::ReactorOperator
| friend class FIX::ReactorOperator |
|
friend |