#include <RemoteViz/Rendering/Client.h>
Public Member Functions | |
const std::string & | getId () const |
Connection * | getConnection (const std::string &id) const |
Connection * | getConnection (unsigned int index) const |
unsigned int | getNumConnections () const |
const std::string & | getApplicationName () const |
const std::string & | getEnvironment () const |
bool | isImageStreamingSupported () const |
bool | isVideoStreamingSupported () const |
bool | sendMessage (const std::string &message, Connection **excludedConnections=nullptr, unsigned int num=0) const |
void | disconnect () |
ClientSettings * | getSettings () const |
Represents a client application instance using RemoteViz.
In the case of HTML5 applications, a client represents a single instance of a web browser for a single domain name. (See RemoteVizRenderArea)
In the case of the SoRemoteVizClient node, a client represents a single instance of the application using the node.
A client has one or multiple connections.
void RemoteViz::Rendering::Client::disconnect | ( | ) |
Disconnects the client.
A KICKED disconnect message will be sent to all connections of the client, then they will be disconnected.
const std::string& RemoteViz::Rendering::Client::getApplicationName | ( | ) | const |
HTML5 client: Returns the domain name of the web host which the client is connected.
SoRemoteVizClient node: Returns the string "SoRemoteVizClient".
Connection* RemoteViz::Rendering::Client::getConnection | ( | unsigned int | index | ) | const |
Gets a Connection of the client.
index | : index identifying the client |
Connection* RemoteViz::Rendering::Client::getConnection | ( | const std::string & | id | ) | const |
Gets a Connection of the client.
id | : ID identifying the client |
const std::string& RemoteViz::Rendering::Client::getEnvironment | ( | ) | const |
HTML5 client: Returns the value of the user-agent header sent by the client web browser.
SoRemoteVizClient node: Returns the operating system (OS) running the client application.
const std::string& RemoteViz::Rendering::Client::getId | ( | ) | const |
Gets the id of the client.
The client id is a Globally Unique Identifier.
unsigned int RemoteViz::Rendering::Client::getNumConnections | ( | ) | const |
Gets the number of the client connections.
ClientSettings* RemoteViz::Rendering::Client::getSettings | ( | ) | const |
Gets the client settings.
bool RemoteViz::Rendering::Client::isImageStreamingSupported | ( | ) | const |
Returns if the client supports image streaming.
bool RemoteViz::Rendering::Client::isVideoStreamingSupported | ( | ) | const |
Returns if the client supports video streaming.
bool RemoteViz::Rendering::Client::sendMessage | ( | const std::string & | message, | |
Connection ** | excludedConnections = nullptr , |
|||
unsigned int | num = 0 | |||
) | const |
Sends a text message to all the connections of the client.
message | : the message to be sent to all the connections of the client | |
excludedConnections | : the connections that will not receive the message. | |
num | : number of excluded connections |