Client Class |
Represents a client application instance using RemoteViz.
Namespace: OIV.RemoteViz.Rendering
The Client type exposes the following members.
Name | Description | |
---|---|---|
Disconnect | Disconnects the client. | |
Equals | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) | |
GetConnection(String) | Gets a OIV.RemoteViz.Rendering.Connection of the client. | |
GetConnection(UInt32) | Gets a OIV.RemoteViz.Rendering.Connection of the client. | |
GetHashCode |
Overrides GetHashCode().
(Inherited from SoNetBase.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
IsImageStreamingSupported | Returns if the client supports image streaming. | |
IsVideoStreamingSupported | Returns if the client supports video streaming. | |
SendMessage(IListByte) | Calls SendMessage(buffer, {}). | |
SendMessage(String) | Calls SendMessage(message, {}). | |
SendMessage(IListByte, IListConnection) | Sends a binary message to all the connections of the client. | |
SendMessage(String, IListConnection) | Sends a text message to all the connections of the client. | |
ToString | Returns a string that represents the current object. (Inherited from Object.) |
Name | Description | |
---|---|---|
ApplicationName | HTML5 client: Returns the domain name of the web host to which the client is connected. | |
Environment | HTML5 client: Returns the value of the user-agent header sent by the client web browser. | |
Id | Gets the id of the client. | |
IsConnected | Gets the state of the OIV.RemoteViz.Rendering.Client: connected or disconnected. | |
NumConnections | Gets the number of client connections. | |
Settings | Gets the client settings. |
In the case of HTML5 applications, a client represents a web page. See RemoteVizRenderArea.
In the case of the OIV.RemoteViz.Clients.Nodes.SoRemoteVizClient node, a client represents a single instance of the application using the node.
When a client first connects to the RemoteViz service (e.g by calling the RemoteVizRenderArea method connectTo()), a OIV.RemoteViz.Rendering.Client object is automatically created and the OIV.RemoteViz.Rendering.ServiceListener method onConnectedClient() is called with the client id. The client object can be queried using OIV.RemoteViz.Rendering.Service.GetClient(System.String). A OIV.RemoteViz.Rendering.Connection object is also created. A OIV.RemoteViz.Rendering.RenderArea object is created if the requested render area does not already exist. In any case the OIV.RemoteViz.Rendering.Connection can be queried using the OIV.RemoteViz.Rendering.Client.GetConnection(System.String) method and the associated OIV.RemoteViz.Rendering.RenderArea can be queried using the () method.
A service has zero clients initially and may allow one client or multiple clients (see OIV.RemoteViz.Rendering.ServiceListener methods onPendingCreateRenderArea and onPendingShareRenderArea). While the service is running, you can get the current client(s) using the OIV.RemoteViz.Rendering.Service methods getNumClients() and getClient().
A client has at least one connection but may have multiple connections if the service allows that. See the methods () and OIV.RemoteViz.Rendering.Client.GetConnection(System.String).
When a client is disconnected, the OIV.RemoteViz.Rendering.ServiceListener method onDisconnectedClient() is called. Following this call, the client object will no longer be referenced by RemoteViz and will be disposed unless the application holds a reference.