Skip to content

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 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

  1. Install the latest Anyware Software Client. For more information see the topic "Installing the Anyware Software Client for Mac" in the Administrators' Guide.

  2. Download the latest SDK.

  3. To install the SDK, open the .dmg file, and drag the PCoIPSoftClientSDK folder to your Documents folder (or another 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, then connects to the remote agent.

Location of the login_info_collaborator File

The login_info_collaborator.txt file is available in the following location: ~/Documents/PCoIPSoftClientSDK/Examples/broker_client_example/bin

  1. Open the login_info_collaborator.txt file.

  2. 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
    
  3. Run the example from a Terminal session:

        cd ~/Documents/PCoIPSoftClientSDK/Examples/broker_client_example/bin/broker_client_example_collaborator.app/Contents/MacOS
    
        killall PCoIPClient
    
        ./broker_client_example_collaborator -l -i ~/Documents/PCoIPSoftClientSDK/Examples/broker_client_example/bin/login_info_collaborator.txt
    

A status message will be displayed indicating whether the connection was successful.

Building the Broker Client Example

  1. From the root folder inside the PCoIPSoftClientSDK folder, use the cd command to change the directory to the src folder of the Broker Client example:

    cd ~/Documents/PCoIPSoftClientSDK/Examples/broker_client_example/src
    
    2. Create a build directory by running the following command:

    mkdir build
    
    3. Change the directory to build by running the following command:

    cd build
    
  2. Configure the SDK example by running the following command:

    cmake -G Xcode ..
    
  3. 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.