The client represents a network node of the application in the cluster. More...
#include <client.h>


Public Member Functions | |
| Client () | |
| Construct a new client. | |
| virtual | ~Client () |
| Destruct the client. | |
| bool | connectServer (ServerPtr server) |
| Open and connect an Equalizer server to the local client. | |
| bool | disconnectServer (ServerPtr server) |
| Disconnect and close the connection of an Equalizer server to the local client. | |
| bool | hasCommands () |
| void | processCommand () |
| Get and process one pending command from the node command queue. | |
| CommandQueue * | getNodeThreadQueue () |
Protected Member Functions | |
| virtual bool | clientLoop () |
| Implements the processing loop for render clients. | |
| virtual bool | exitClient () |
| Reimplemented to also call eq::exit() on render clients. | |
| virtual bool | listen () |
| virtual bool | close () |
The client represents a network node of the application in the cluster.
The methods initLocal() and exitLocal() should be used to set up and exit the listening node instance for each application process.
Definition at line 38 of file lib/client/client.h.
| eq::Client::Client | ( | ) |
| eq::Client::~Client | ( | ) | [virtual] |
Destruct the client.
Reimplemented in eqNbody::Client.
Definition at line 51 of file lib/client/client.cpp.
References close(), and EQINFO.

| bool eq::Client::connectServer | ( | ServerPtr | server | ) |
Open and connect an Equalizer server to the local client.
The client has to be in the listening state, see initLocal().
Definition at line 78 of file lib/client/client.cpp.
References eq::net::Node::_connect(), eq::net::Node::connect(), EQINFO, EQWARN, eq::base::RefPtr< T >::get(), and eq::Global::getServer().
Referenced by eVolve::EVolve::run(), and eqPly::EqPly::run().


| bool eq::Client::disconnectServer | ( | ServerPtr | server | ) |
Disconnect and close the connection of an Equalizer server to the local client.
Definition at line 183 of file lib/client/client.cpp.
References close(), EQWARN, eq::CommandQueue::flush(), and eq::base::RefPtr< T >::get().
Referenced by eVolve::EVolve::run(), and eqPly::EqPly::run().


| bool eq::Client::hasCommands | ( | ) |
Definition at line 247 of file lib/client/client.cpp.
References eq::net::CommandQueue::isEmpty().
Referenced by eqPly::EqPly::run().


| void eq::Client::processCommand | ( | ) |
Get and process one pending command from the node command queue.
Used internally to run node commands.
Definition at line 252 of file lib/client/client.cpp.
References eq::net::COMMAND_DISCARD, eq::net::COMMAND_ERROR, eq::net::COMMAND_HANDLED, and eq::CommandQueue::pop().
Referenced by clientLoop(), and eqPly::EqPly::run().


| CommandQueue* eq::Client::getNodeThreadQueue | ( | ) | [inline] |
For internal use only.
Definition at line 77 of file lib/client/client.h.
| bool eq::Client::clientLoop | ( | ) | [protected, virtual] |
Implements the processing loop for render clients.
As long as the node is running, that is, between initLocal() and an exit send from the server, this method executes received commands using processCommand() and triggers the message pump between commands.
Reimplemented from eq::net::Node.
Reimplemented in eqNbody::Client, eqPly::EqPly, and eVolve::EVolve.
Definition at line 227 of file lib/client/client.cpp.
References EQINFO, eq::CommandQueue::flush(), and processCommand().
Referenced by eVolve::EVolve::clientLoop(), eqPly::EqPly::clientLoop(), and eqNbody::Client::clientLoop().


| bool eq::Client::exitClient | ( | ) | [protected, virtual] |
Reimplemented to also call eq::exit() on render clients.
Reimplemented from eq::net::Node.
Definition at line 242 of file lib/client/client.cpp.
References eq::exit(), and eq::net::Node::exitClient().

| bool eq::Client::listen | ( | ) | [protected, virtual] |
Reimplemented from eq::net::Node.
Definition at line 57 of file lib/client/client.cpp.
References eq::net::Dispatcher::registerCommand().

| bool eq::Client::close | ( | ) | [protected, virtual] |
Reimplemented from eq::net::Node.
Definition at line 68 of file lib/client/client.cpp.
References eq::net::Node::close().
Referenced by disconnectServer(), and ~Client().


0.9.1 by
1.6.1