neuray API Programmer's Manual

mi::bridge::IIray_bridge_server Class Reference

[Bridge server]

Description

API component that serves as entry point for the server-side Iray Bridge API. This API component is provided by the iray_bridge_server plugin.

Public Member Functions

virtual IIray_bridge_applicationcreate_application( const char* application_path, http::​IServer* http_server) =0
Creates an Iray Bridge application. More...
virtual Sint32 delete_snapshot( const char* snapshot_path) =0
Deletes a bridge snapshot specified by the provided path to a .cb file on disk. More...
virtual Sint32 delete_snapshot_from_string( const char* cb_data) =0
Deletes a bridge snapshot specified by the provided cb file contents stored as a string. More...
virtual const char* get_bridge_protocol_version() const =0
Returns the Bridge protocol version.

Member Functions

virtual IIray_bridge_application* mi::​bridge::​IIray_bridge_server::create_application( const char* application_path, http::​IServer* http_server) [pure virtual]

Creates an Iray Bridge application. The Iray Bridge application instance provides the server-side features of Iray Bridge rendering.

See also:

mi::bridge::IIray_bridge_client::set_application_url()

Parameters

application_path
The path component of the WebSocket URL to the application. This identifier allows to run different Iray Bridge applications on the same HTTP server. Note that the application path must start with a slash.
http_server
The HTTP server instance that handles WebSocket requests for this application.

Returns

The created Iray Bridge application, or NULL in case of failure (invalid arguments, application_path does not start with a slash, or an application for these arguments exists already).

virtual Sint32 mi::​bridge::​IIray_bridge_server::delete_snapshot( const char* snapshot_path) [pure virtual]

Deletes a bridge snapshot specified by the provided path to a .cb file on disk. Note that the disk cache referenced by the snapshot must be reachable for the snapshot to be successfully deleted.

See also:

mi::bridge::IIray_bridge_snapshot_context

Parameters

snapshot_path
The path to the snapshot .cb file to delete.

Returns

  • 0: Success.
  • -1: Invalid argument.
  • -2: The snapshot file was not found or inaccessible.
  • -3: Failed to remove the cached data for the snapshot.
  • -4: Failed to delete the snapshot file.
  • <= -5: Unspecified error.

virtual Sint32 mi::​bridge::​IIray_bridge_server::delete_snapshot_from_string( const char* cb_data) [pure virtual]

Deletes a bridge snapshot specified by the provided cb file contents stored as a string. This method works the same as delete_snapshot() but covers the case when the cb file contents is not stored in a .cb file on disk. Note that the disk cache referenced by the snapshot must be reachable for the snapshot to be successfully deleted.

See also:

mi::bridge::IIray_bridge_snapshot_context

Parameters

cb_data
The cb data as a char buffer.

Returns

  • 0: Success.
  • -1: Invalid argument.
  • -2: Failed to remove the cached data for the snapshot.
  • <= -3: Unspecified error.

virtual const char* mi::​bridge::​IIray_bridge_server::get_bridge_protocol_version() const [pure virtual]

Returns the Bridge protocol version.