#include <localsession.h>
Inheritance diagram for rGeddei::LocalSession:
Public Member Functions | |
LocalSession (const QString &host, uint port=GEDDEI_PORT-1) | |
Friends | |
class | LocalDomProcessor |
class | LocalProcessor |
class | RemoteDomProcessor |
class | RemoteProcessor |
This is the local equivalent to the RemoteSession class, this is a very basic class to provide a similar mechanism to creating rGeddei LocalProcessor objects in the local space but have them be able to simply connect to the other rGeddei objects (i.e. RemoteProcessor objects).
The LocalSession class extends a class known as a ProcessorForwarder. This allows it to open a port on the local host neccessary to forward incoming data connections to the relevant processor. Each LocalSession object must have its own port, though in all normal circumstances only one LocalSession object is needed.
The LocalSession object's forwarding capabilities make use of Qt's event loop, and as such any application that uses this class *must* be running Qt's event-driven loop. The easy way to do this is to use QSubApp.
Tip: It is usually a good idea to declare the LocalSession object in the global scope.
rGeddei::LocalSession::LocalSession | ( | const QString & | host, | |
uint | port = GEDDEI_PORT-1 | |||
) |
Basic constructor. Constructs a LocalSession object on this host, which should be able to be referred to as host, with the incoming data connections on port port.
host | The hostname that this machine should be able to be contacted at. Specify as a numeric address for safety. | |
port | The port that should be used for listenning for incoming Geddei connections. Default is the default Geddei port minus 1, 16660. We subtract 1 in order that we can use a nodeserver on this machine too, without a default port clash. |