neuray API Programmer's Manual

mi::bridge::IBridge_server Class Reference

[Bridge server]

Description

API component that serves as entry point for the server-side Bridge API. Can be used to create Bridge application and a context to import or remove snapshots.

Public Member Functions

virtual IApplicationcreate_application( const char* application_path, http::​IServer* http_server) =0
Creates a Bridge application. More...
virtual IBridge_snapshot_contextcreate_snapshot_context( const char* disk_cache) =0
Creates a snapshot context for importing or deleting snapshots. More...
virtual const char* get_bridge_protocol_version() const =0
Returns the Bridge protocol version string.

Member Functions

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

Creates a Bridge application. The application will listen on the provided path on the given HTTP server for clients. The application has to be opened for connections before clients can open a session to it.

See also:

mi::bridge::IBridge_client::get_session()

Parameters

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

Returns

The created 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 IBridge_snapshot_context* mi::​bridge::​IBridge_server::create_snapshot_context( const char* disk_cache) [pure virtual]

Parameters

disk_cache
The location of the disk cache. This can be either a directory on the local machine (prefix "path:") or the address of some cache manager (prefix "address:").

Returns

The snapshot context.

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

Returns the Bridge protocol version string.