Using The Collaboration Broker Client Example
The sample Collaboration Broker Client demonstrates how the APIs can be used to customize and control the pre-session and session phases of the Collaboration connection. Invoking the Collaboration Broker Client API is a two-step procedure, where as a first step, the Collaboration Broker Client Example is built. The second step consists of running a prebuilt Collaboration binary.
More About the Collaboration Broker Client
The Collaboration Broker Client Example extends on the Broker Client Example, and demonstrates how the Broker Client joins a collaboration session.
Code is an API Demonstration Only
The sample session client, described in the following
sections, demonstrates a simple connection scenario using
the supplied broker client library
. The example
unrealistically assumes that all requests and calls succeed
as expected, and performs only basic error handling.
An actual client implementation is likely to be far more
complex; for example, you will need to handle failed broker
certificate verification, account for other authentication steps
beyond a simple user ID and password combination, and
any other circumstances dictated by your system
requirements.
Installing the Linux SDK
-
Install the latest Anyware Software Client. For more information see the topic "Installing the Anyware Software Client for Linux" in the Administrators' Guide.
-
Download the latest Linux SDK.
-
Install the SDK debian package on your system.
Running the Prebuilt Collaboration Example Binary
This topics contains instructions for running the Collaboration example binary that is packaged along with the Client SDK. The example uses credentials provided by the primary session owner to first establish a PCoIP session, and then launch the Anyware Software Client as a collaborator. The Anyware Software Client thus launched, connects to the remote agent.
Location of the login_info_collaborator File
The login_info_collaborator.txt file is available in the following location: /usr/lib/x86_64-linux-gnu/pcoip-client/examples/broker_client_example/
-
From the broker_client_example folder, open the login_info_collaborator.txt file.
-
Add the collaborator session details in the format "invite_URI collaborator_name invite_code", where,
- invite_uri: The collaboration invitation URI provided by the primary session owner.
- collaborator_name: The name of the collaborator.
- invite_code: The invitation code provided by the primary session owner.
Example:
pcoip://10.11.12.13/connect?data=eyJhbGciOiJIUzI1NiJ9.eyJSb2xlIjoiQWRtaW4iLCJJc3N1ZXIiOiJJc3N1ZXIiLCJVc2VybmFtZSI6IkphdmFJblVzZSIsImV4cCI6MTY3MDYwMTQ1MSwiaWF0IjoxNjcwNjAxNDUxfQ.z8w07IcV5eYbqbYGdjscMVSWFUB4tbU9WrV_V4GWyDU collaborator 123435
-
Run the example from a Terminal session:
/usr/bin/broker_client_example_collaborator -l -i /usr/lib/x86_64-linux-gnu/pcoip-client/examples/broker_client_example/login_info_collaborator.txt
A status message will be displayed indicating whether the connection was successful.
Building the Broker Client Example
Detailed Instructions
For detailed information on building the client SDK, see the Building the Linux SDK topic.
-
Create a build directory at the location of your preference by running the following command:
mkdir build
-
Change the directory to
build
by running the following command:cd build
-
Configure the SDK example by running the following command:
cmake /usr/lib/x86_64-linux-gnu/pcoip-client/examples/broker_client_example -DCMAKE_BUILD_TYPE=RelWithDebInfo
-
Build the example by running the following command:
cmake --build . --config RelWithDebInfo
Custom Broker Client Library Implementations
This procedure creates the broker_client_example_collaborator
executable.