#include <OSGClusterServer.h>
Collaboration diagram for osg::ClusterServer:

Public Methods | |
Constructors | |
| ClusterServer (WindowPtr window, const string &serviceName, const string &connectionType="StreamSock", const string &address="", UInt32 servicePort=8437) | |
Destructor | |
| virtual | ~ClusterServer (void) |
your_category | |
| void | start (void) |
| void | stop (void) |
| void | render (RenderAction *action) |
Protected Methods | |
your_category | |
| bool | windowChanged (FieldContainerPtr &fcp, RemoteAspect *) |
Protected Attributes | |
Member | |
| WindowPtr | _window |
| Connection * | _connection |
| string | _address |
| ClusterWindowPtr | _clusterWindow |
| RemoteAspect * | _aspect |
| string | _serviceName |
| UInt32 | _servicePort |
| bool | _serviceAvailable |
| UInt32 | _serverId |
| string | _connectionType |
Private Methods | |
| ClusterServer (const ClusterServer &source) | |
| prohibit default function (move to 'public' if needed) | |
| void | operator= (const ClusterServer &source) |
| prohibit default function (move to 'public' if needed) | |
Static Private Methods | |
Thread | |
| void * | serviceProc (void *arg) |
A ClusterServer is responsible for syncronizing all client changes. Each cluster renderer can offer it's service by a symbolic name. So it is possible to have a server called "left" or "right". The server uses a local Qt or GLUT window for rendering.
// create a server GLUTWindowPtr window=GLUTWindow::create(); server = new ClusterServer(window,"server1","Multicast"); // wait for clients to connect server->init(); ... // render server->render(ract);
|
||||||||||||||||||||||||
|
Constructor
|
|
|
Destructor Disconnect from all connected rendering servers |
|
|
prohibit default function (move to 'public' if needed)
|
|
|
start server Start cluster server and wait for a client to connect. This method will return after a client connection or an error situation. |
|
|
start server Start cluster server and wait for a client to connect. This method will return after a client connection or an error situation. |
|
|
render server window
Synchronize all field containers with the client and call
|
|
||||||||||||
|
clusterWindow changed callback this is a callback functor. It is called for each change of a ClusterWindow. |
|
|
tell address of server requested over broadcast serviceProc is a static class function that is processed in a seperate thread. It tells all requesting clients on which network address this server is waiting for connecitons. We do this in a thread because not all network types are able to set a timeout for accept. The service thread tells clients the address on wich the accept is expected. After a successful connection the service thread will be termnated.
|
|
|
prohibit default function (move to 'public' if needed)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.2.16