Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
FIX::ServerWrapper Class Reference

Handles events from SocketMonitor for server connections. More...

Inheritance diagram for FIX::ServerWrapper:
Inheritance graph
[legend]
Collaboration diagram for FIX::ServerWrapper:
Collaboration graph
[legend]

Public Member Functions

 ServerWrapper (std::set< int > sockets, SocketServer &server, SocketServer::Strategy &strategy)
 
- Public Member Functions inherited from FIX::SocketMonitor::Strategy
virtual ~Strategy ()
 

Private Types

typedef std::set< int > Sockets
 

Private Member Functions

void onConnect (SocketMonitor &, int socket)
 
void onEvent (SocketMonitor &monitor, int socket)
 
void onWrite (SocketMonitor &, int socket)
 
void onError (SocketMonitor &monitor, int socket)
 
void onError (SocketMonitor &)
 
void onTimeout (SocketMonitor &)
 

Private Attributes

Sockets m_sockets
 
SocketServerm_server
 
SocketServer::Strategym_strategy
 

Detailed Description

Handles events from SocketMonitor for server connections.

Definition at line 57 of file SocketServer.cpp.

Member Typedef Documentation

◆ Sockets

typedef std::set<int> FIX::ServerWrapper::Sockets
private

Definition at line 118 of file SocketServer.cpp.

Constructor & Destructor Documentation

◆ ServerWrapper()

FIX::ServerWrapper::ServerWrapper ( std::set< int >  sockets,
SocketServer server,
SocketServer::Strategy strategy 
)
inline

Definition at line 77 of file SocketServer.cpp.

77  {
79  }

References m_server, m_strategy, and FIX::SocketServer::Strategy::onError().

Member Function Documentation

◆ onConnect()

void FIX::ServerWrapper::onConnect ( SocketMonitor ,
int  socket 
)
inlineprivatevirtual

Implements FIX::SocketMonitor::Strategy.

Definition at line 82 of file SocketServer.cpp.

82  {
84  };

References m_server, m_strategy, and FIX::SocketServer::Strategy::onTimeout().

◆ onError() [1/2]

void FIX::ServerWrapper::onError ( SocketMonitor )
inlineprivatevirtual

Implements FIX::SocketMonitor::Strategy.

Definition at line 110 of file SocketServer.cpp.

◆ onError() [2/2]

void FIX::ServerWrapper::onError ( SocketMonitor monitor,
int  socket 
)
inlineprivatevirtual

Implements FIX::SocketMonitor::Strategy.

Definition at line 104 of file SocketServer.cpp.

◆ onEvent()

void FIX::ServerWrapper::onEvent ( SocketMonitor monitor,
int  socket 
)
inlineprivatevirtual

Implements FIX::SocketMonitor::Strategy.

Definition at line 86 of file SocketServer.cpp.

95 : m_monitor( timeout ) {}
96 
97 int SocketServer::add( int port, bool reuse, bool noDelay,

◆ onTimeout()

void FIX::ServerWrapper::onTimeout ( SocketMonitor )
inlineprivatevirtual

Reimplemented from FIX::SocketMonitor::Strategy.

Definition at line 115 of file SocketServer.cpp.

◆ onWrite()

void FIX::ServerWrapper::onWrite ( SocketMonitor ,
int  socket 
)
inlineprivatevirtual

Implements FIX::SocketMonitor::Strategy.

Definition at line 99 of file SocketServer.cpp.

100 {
101  if( m_portToInfo.find(port) != m_portToInfo.end() )
102  return m_portToInfo[port].m_socket;

Member Data Documentation

◆ m_server

SocketServer& FIX::ServerWrapper::m_server
private

Definition at line 124 of file SocketServer.cpp.

Referenced by onConnect(), and ServerWrapper().

◆ m_sockets

Sockets FIX::ServerWrapper::m_sockets
private

Definition at line 123 of file SocketServer.cpp.

◆ m_strategy

SocketServer::Strategy& FIX::ServerWrapper::m_strategy
private

Definition at line 125 of file SocketServer.cpp.

Referenced by onConnect(), and ServerWrapper().


The documentation for this class was generated from the following file:
FIX::SocketServer::Strategy::onError
virtual void onError(SocketServer &)=0
FIX::SocketServer::Strategy::onTimeout
virtual void onTimeout(SocketServer &)
Definition: SocketServer.h:112
FIX::ServerWrapper::m_strategy
SocketServer::Strategy & m_strategy
Definition: SocketServer.cpp:125
FIX::ServerWrapper::m_server
SocketServer & m_server
Definition: SocketServer.cpp:124
FIX::SocketServer::add
int add(int port, bool reuse=false, bool noDelay=false, int sendBufSize=0, int rcvBufSize=0)
Definition: SocketServer.cpp:114

Generated on Wed Apr 29 2020 19:41:30 for QuickFIX by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2001