OnixS C++ FIX Engine  4.10.1
API Documentation
Stack Class Reference

#include <OnixS/FIXEngine/FIX/TcpDirectStack.h>

Public Member Functions

 Stack (const Attributes &attr)
 
 ~Stack ()
 
void dispatchEvents () ONIXS_FIXENGINE_OVERRIDE
 
bool isQuiescent () const ONIXS_FIXENGINE_OVERRIDE
 
Threading::ThreadId threadId () const ONIXS_FIXENGINE_OVERRIDE
 
ReactorType::Enum type () const ONIXS_FIXENGINE_OVERRIDE
 
- Public Member Functions inherited from ISessionReactor
virtual ~ISessionReactor () ONIXS_FIXENGINE_DEFAULT
 

Friends

class FIX::ReactorOperator
 

Detailed Description

Definition at line 35 of file TcpDirectStack.h.

Constructor & Destructor Documentation

Stack ( const Attributes attr)
explicit

Allocates a stack with the supplied attributes.

Parameters
attrA 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
Thestd::bad_alloc is thrown in case of out of memory. N.B. Huge pages are required.
Thestd::runtime_error is thrown if the TCPDirect library reported an error.
Thestd::exception is thrown if a system call reported an error.
~Stack ( )

Member Function Documentation

void dispatchEvents ( )
inlinevirtual

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.

Warning
The event dispatching should be performed from the same thread that created the stack.

Implements ISessionReactor.

Definition at line 73 of file TcpDirectStack.h.

bool isQuiescent ( ) const
inlinevirtual
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.

Implements ISessionReactor.

Definition at line 90 of file TcpDirectStack.h.

Threading::ThreadId threadId ( ) const
inlinevirtual

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 101 of file TcpDirectStack.h.

ReactorType::Enum type ( ) const
inlinevirtual
Returns
The type of the stack.

Implements ISessionReactor.

Definition at line 105 of file TcpDirectStack.h.

Friends And Related Function Documentation

friend class FIX::ReactorOperator
friend

Definition at line 124 of file TcpDirectStack.h.


The documentation for this class was generated from the following file: