Index Source Files Annotated Class List Alphabetical Class List Class Hierarchy Graphical Class Hierarchy

# FIX::ServerWrapper Class Reference

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

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

List of all members.

## Public Member Functions

| ServerWrapper (std::set< int > sockets, SocketServer &server, SocketServer::Strategy &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 41 of file SocketServer.cpp.

## Member Typedef Documentation

typedef std::set<int> FIX::ServerWrapper::Sockets`[private]`

Definition at line 97 of file SocketServer.cpp.

## Constructor & Destructor Documentation

FIX::ServerWrapper::ServerWrapper | ( | std::set< int > | sockets,
|  | SocketServer & | server,
|  | SocketServer::Strategy & | strategy |
| ) |  |  | `[inline]`

Definition at line 44 of file SocketServer.cpp.

    00046 : m_sockets( sockets ), m_server( server ), m_strategy( strategy ) {}

## Member Function Documentation

void FIX::ServerWrapper::onConnect | ( | SocketMonitor & | ,
|  | int | socket |
| ) |  |  | `[inline, private, virtual]`

Implements FIX::SocketMonitor::Strategy.

Definition at line 49 of file SocketServer.cpp.

References QF_STACK_POP, and QF_STACK_PUSH.

    00050   { QF_STACK_PUSH(ServerWrapper::onConnect)
    00051     QF_STACK_POP
    00052   }

void FIX::ServerWrapper::onError | ( | SocketMonitor & |  | ) | `[inline, private, virtual]`

Implements FIX::SocketMonitor::Strategy.

Definition at line 87 of file SocketServer.cpp.

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

    00088   { QF_STACK_PUSH(ServerWrapper::onError)
    00089     m_strategy.onError( m_server );
    00090     QF_STACK_POP
    00091   }

void FIX::ServerWrapper::onError | ( | SocketMonitor & | monitor,
|  | int | socket |
| ) |  |  | `[inline, private, virtual]`

Implements FIX::SocketMonitor::Strategy.

Definition at line 78 of file SocketServer.cpp.

References FIX::SocketMonitor::drop(), m_server, m_strategy, FIX::SocketServer::Strategy::onDisconnect(), QF_STACK_POP, and QF_STACK_PUSH.

Referenced by onError(), and onEvent().

    00079   { QF_STACK_PUSH(ServerWrapper::onError)
    00080
    00081     m_strategy.onDisconnect( m_server, socket );
    00082     monitor.drop( socket );
    00083
    00084     QF_STACK_POP
    00085   }

void FIX::ServerWrapper::onEvent | ( | SocketMonitor & | monitor,
|  | int | socket |
| ) |  |  | `[inline, private, virtual]`

Implements FIX::SocketMonitor::Strategy.

Definition at line 54 of file SocketServer.cpp.

References FIX::SocketServer::accept(), m_server, m_sockets, m_strategy, FIX::SocketServer::Strategy::onConnect(), FIX::SocketServer::Strategy::onData(), onError(), QF_STACK_POP, and QF_STACK_PUSH.

    00055   { QF_STACK_PUSH(ServerWrapper::onEvent)
    00056
    00057     if( m_sockets.find(socket) != m_sockets.end() )
    00058     {
    00059       m_strategy.onConnect( m_server, socket, m_server.accept(socket) );
    00060     }
    00061     else
    00062     {
    00063       if( !m_strategy.onData( m_server, socket ) )
    00064         onError( monitor, socket );
    00065     }
    00066
    00067     QF_STACK_POP
    00068   }

void FIX::ServerWrapper::onTimeout | ( | SocketMonitor & |  | ) | `[inline, private, virtual]`

Reimplemented from FIX::SocketMonitor::Strategy.

Definition at line 93 of file SocketServer.cpp.

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

    00094   { QF_STACK_PUSH(ServerWrapper::onTimeout)
    00095     m_strategy.onTimeout( m_server );
    00096     QF_STACK_POP
    00097   };

void FIX::ServerWrapper::onWrite | ( | SocketMonitor & | ,
|  | int | socket |
| ) |  |  | `[inline, private, virtual]`

Implements FIX::SocketMonitor::Strategy.

Definition at line 70 of file SocketServer.cpp.

References m_server, m_strategy, FIX::SocketServer::Strategy::onWrite(), QF_STACK_POP, and QF_STACK_PUSH.

    00071   { QF_STACK_PUSH(ServerWrapper::onWrite)
    00072
    00073     m_strategy.onWrite( m_server, socket );
    00074
    00075     QF_STACK_POP
    00076   }

## Member Data Documentation

SocketServer& FIX::ServerWrapper::m_server`[private]`

Definition at line 103 of file SocketServer.cpp.

Referenced by onError(), onEvent(), onTimeout(), and onWrite().

Sockets FIX::ServerWrapper::m_sockets`[private]`

Definition at line 102 of file SocketServer.cpp.

Referenced by onEvent().

SocketServer::Strategy& FIX::ServerWrapper::m_strategy`[private]`

Definition at line 104 of file SocketServer.cpp.

Referenced by onError(), onEvent(), onTimeout(), and onWrite().

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

- /home/omiller/Development/autobuild/quickfix/src/C++/SocketServer.cpp