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 to demonstrate how the Broker Client can join 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 Client SDK
-
Install the latest Anyware Software Client. For more information see the topic "Installing the Anyware Software Client for Windows" in the Administrators' Guide.
-
Download the latest Windows SDK.
-
To install the SDK, extract the contents of the SDK ZIP file to a location of your preference.
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: 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 by running the following commands:
<install location of the SDK package>\pcoip-client-sdk_23\bin\broker_client_example.exe -l -i
<install location of the SDK package>\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
Custom Broker Client Library Implementations
After you complete step 6, the build directory will contain the examples as .exe files, which you can launch from the command line or double click, depending on what you have built.
-
From the PCoIPSoftClientSDK folder, use the
cd
command to change the directory to broker_client_example. -
Create a directory called build inside the broker_client_example folder by running the following command:
mkdir build
-
Change the directory to build by using the
cd
command.cd build
-
Configure the SDK example by running the following command:
cmake..
-
Build the example by running the following command:
cmake --build . --config RelWithDebInfo
-
Ensure that the CMakeLists.txt file present inside the directory has the path to the SDK directory appended to the
CMAKE_PREFIX_PATH
parameter. This allows the installed version of Cmake to locate the Cmake modules for finding the dependencies:list(APPEND CMAKE_PREFIX_PATH "localpath/to/sdk/") find_package(PCoIPSoftClientSDK REQUIRED)
-
Link your application to the core library using the
CMake
command:target_link_libraries(your_application PRIVATE PCoIPSoftClientSDK:pcoip_core)
-
Use the command in step 7 to link other libraries.