Equalizer 1.0
|
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 to an Equalizer server. | |
virtual bool | initLocal (const int argc, char **argv) |
Initialize a local, listening node. | |
bool | hasCommands () |
virtual co::CommandQueue * | getMainThreadQueue () |
Protected Member Functions | |
virtual void | clientLoop () |
Implements the processing loop for render clients. | |
virtual void | exitClient () |
Exit the process cleanly on render clients. |
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 include/eq/client.h.
eq::Client::Client | ( | ) |
virtual eq::Client::~Client | ( | ) | [virtual] |
Destruct the client.
Reimplemented from eq::fabric::Client.
Reimplemented in eqNbody::Client.
virtual void 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 in eqPly::EqPly, and eVolve::EVolve.
Referenced by eVolve::EVolve::clientLoop().
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().
server | the server. |
Referenced by osgScaleViewer::OSGScaleViewer::run(), and eqPly::EqPly::run().
bool eq::Client::disconnectServer | ( | ServerPtr | server | ) |
Disconnect and close the connection to an Equalizer server.
server | the server. |
Referenced by osgScaleViewer::OSGScaleViewer::run(), and eqPly::EqPly::run().
virtual void eq::Client::exitClient | ( | ) | [protected, virtual] |
Exit the process cleanly on render clients.
virtual co::CommandQueue* eq::Client::getMainThreadQueue | ( | ) | [inline, virtual] |
Implements eq::fabric::Client.
Definition at line 90 of file include/eq/client.h.
bool eq::Client::hasCommands | ( | ) |
Referenced by eqPly::EqPly::run().
virtual bool eq::Client::initLocal | ( | const int | argc, |
char ** | argv | ||
) | [virtual] |
Initialize a local, listening node.
The --eq-client
command line option is recognized by this method. It is used for remote nodes which have been auto-launched by another node, e.g., remote render clients. This method does not return when this command line option is present.
argc | the command line argument count. |
argv | the command line argument values. |
true
if the client was successfully initialized, false
otherwise. Reimplemented from co::LocalNode.