OnixS C++ CME iLink 3 Binary Order Entry Handler  1.17.0
API Documentation
TcpDirectStack Class Referencefinal

#include <OnixS/CME/iLink3/TcpDirectStack.h>

Public Member Functions

 TcpDirectStack (const TcpDirectAttr &attr)
 
 TcpDirectStack (const TcpDirectStack &)=delete
 
TcpDirectStackoperator= (const TcpDirectStack &)=delete
 
 TcpDirectStack (TcpDirectStack &&)=delete
 
TcpDirectStackoperator= (TcpDirectStack &&)=delete
 
 ~TcpDirectStack () override
 
void dispatchEvents () override
 
bool isQuiescent () const override
 
Threading::ThreadId workingThreadId () const override
 
ReactorType::Enum type () const override
 
- Public Member Functions inherited from SessionReactor
virtual ~SessionReactor ()=default
 

Friends

class SessionImpl
 

Detailed Description

Definition at line 35 of file TcpDirectStack.h.

Constructor & Destructor Documentation

TcpDirectStack ( const TcpDirectAttr 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
std::bad_allocOut of memory. N.B. TCPDirect API requires huge pages.
std::runtime_errorthe TCPDirect library reported an error, see the error text.
std::exceptionSystem call reported an error, see the error text.
TcpDirectStack ( const TcpDirectStack )
delete
TcpDirectStack ( TcpDirectStack &&  )
delete
~TcpDirectStack ( )
override

Member Function Documentation

void dispatchEvents ( )
inlineoverridevirtual

This function 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 FIXP timers.

Please see the "Stack polling" section in the TCPDirect User Guide for further information.

Implements SessionReactor.

Definition at line 70 of file TcpDirectStack.h.

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 destroying a stack (or exiting the application). Destroying 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
When using the Windows TCPDirect emulator, destroying a stack while it is not quiescent may cause a memory leak.

Implements SessionReactor.

Definition at line 84 of file TcpDirectStack.h.

TcpDirectStack& operator= ( const TcpDirectStack )
delete
TcpDirectStack& operator= ( TcpDirectStack &&  )
delete
ReactorType::Enum type ( ) const
inlineoverridevirtual
Returns
the type of the stack.

Implements SessionReactor.

Definition at line 94 of file TcpDirectStack.h.

Threading::ThreadId workingThreadId ( ) const
inlineoverridevirtual
Returns
The Id of the thread that created the stack.

Implements SessionReactor.

Definition at line 90 of file TcpDirectStack.h.

Friends And Related Function Documentation

friend class SessionImpl
friend

Definition at line 113 of file TcpDirectStack.h.


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