FIX::ServerWrapper Class Reference

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

Inheritance diagram for FIX::ServerWrapper:
[legend]
Collaboration diagram for FIX::ServerWrapper:
[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
SocketServer & | m_server
SocketServer::Strategy & | m_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.

{
m_strategy.onError( m_server );
}

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

## Member Function Documentation

## onConnect()

void FIX::ServerWrapper::onConnect | ( | SocketMonitor & | ,
|  | int | socket
| ) |  |

inline private virtual

Implements FIX::SocketMonitor::Strategy.

Definition at line 82 of file SocketServer.cpp.

{
m_strategy.onTimeout( m_server );
};

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

## onError() [1/2]

void FIX::ServerWrapper::onError | ( | SocketMonitor & |  | ) |

inline private virtual

Implements FIX::SocketMonitor::Strategy.

Definition at line 110 of file SocketServer.cpp.

## onError() [2/2]

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

inline private virtual

Implements FIX::SocketMonitor::Strategy.

Definition at line 104 of file SocketServer.cpp.

## onEvent()

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

inline private virtual

Implements FIX::SocketMonitor::Strategy.

Definition at line 86 of file SocketServer.cpp.

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

## onTimeout()

void FIX::ServerWrapper::onTimeout | ( | SocketMonitor & |  | ) |

inline private virtual

Reimplemented from FIX::SocketMonitor::Strategy.

Definition at line 115 of file SocketServer.cpp.

## onWrite()

void FIX::ServerWrapper::onWrite | ( | SocketMonitor & | ,
|  | int | socket
| ) |  |

inline private virtual

Implements FIX::SocketMonitor::Strategy.

Definition at line 99 of file SocketServer.cpp.

{
if( m_portToInfo.find(port) != m_portToInfo.end() )
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:

- SocketServer.cpp

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