Click or drag to resize
Connection Class

Represents a connection from a OIV.RemoteViz.Rendering.Client to a OIV.RemoteViz.Rendering.RenderArea managed by the RemoteViz service.

Inheritance Hierarchy
SystemObject
  OIV.InventorSoNetBase
    OIV.RemoteViz.RenderingConnection

Namespace: OIV.RemoteViz.Rendering
Assembly: OIV.RemoteViz (in OIV.RemoteViz.dll) Version: 2024.2.0.0 (2024.2.0)
Syntax
public sealed class Connection : SoNetBase

The Connection type exposes the following members.

Methods
  NameDescription
Public methodClose

Closes the connection.

Public methodEquals
Determines whether the specified Object is equal to the current Object.
(Inherited from Object.)
Public methodGetHashCode
Overrides GetHashCode().
(Inherited from SoNetBase.)
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodSendMessage(IListByte)

Sends a binary message to the client.

Public methodSendMessage(String)

Sends a text message to the client.

Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Properties
  NameDescription
Public propertyClient

Gets the client associated with this connection.

Public propertyContainerHeight

Gets the client container height.

Public propertyContainerWidth

Gets the client container width.

Public propertyId

Gets the id of the connection.

Public propertyIsOpen

Gets the state of the OIV.RemoteViz.Rendering.Connection: open or closed.

Public propertyLastEncodedFrame

Gets the last encoded frame sent by the connection.

Public propertyParameters

Gets the connection parameters.

Public propertyRenderArea

Gets the OIV.RemoteViz.Rendering.RenderArea associated with the connection.

Public propertyRequestedHeight

Gets the last renderArea height requested by the client.

Public propertyRequestedWidth

Gets the last renderArea width requested by the client.

Public propertySettings

Gets the connection settings.

Top
Remarks

A OIV.RemoteViz.Rendering.Connection object is created automatically by RemoteViz when a client connects to the service. Each connection belongs to a single OIV.RemoteViz.Rendering.Client and a single OIV.RemoteViz.Rendering.RenderArea. Each OIV.RemoteViz.Rendering.Client may have multiple connections, for example when multiple render areas are created on the same browser page. Each OIV.RemoteViz.Rendering.RenderArea may have multiple connections if it is shared, i.e. displayed in multiple client render areas. Use the OIV.RemoteViz.Rendering.Service object to query a client, then use the OIV.RemoteViz.Rendering.Client object to query its connections.

A OIV.RemoteViz.Rendering.Connection object is passed to many of the OIV.RemoteViz.Rendering.RenderAreaListener methods including onOpenedConnection(), onInitializedConnection() and onSendingFrame().

Using a OIV.RemoteViz.Rendering.Connection object, the application can query the current width and height of the client "container" in pixels and the last OIV.RemoteViz.Rendering.RenderArea width and height requested by the client. Note that the render area and the container are not required to be the same size. If the aspect ratios are different, then the rendered image will be displayed inside the container according to the "displayMode" specified when the client called the RemoteVizRenderArea constructor or set the 'displayMode' field of the OIV.RemoteViz.Clients.Nodes.SoRemoteVizClient node. Possible values are FIT (default), CROP and STRETCH.

A OIV.RemoteViz.Rendering.Connection allows the application to send text or binary messages to the associated client. A JavaScript client will receive the message using a listener (see the RemoteVizRenderArea method addServiceListener). Messages from a client are received using one of the OIV.RemoteViz.Rendering.RenderAreaListener.OnReceivedMessage(OIV.RemoteViz.Rendering.RenderArea, OIV.RemoteViz.Rendering.Connection, System.String) methods.

See Also