Skip to content

The Broker Client Example

The SDK package comes with a sample command line pre-session client called the Broker Client example, which calls the included broker client libraries and establishes a PCoIP connection. The Broker Client API example demonstrates the success path for establishing new PCoIP sessions.

Do not Use the Broker Client Example in Production

The sample broker client is provided as an example only, and should not be used in production.

The sample broker client is located here: usr/bin/

The broker_client_example file, which is the is the sample command-line client executable is located in this directory. The other relevant file is login_info.txt, which is available at: ~/Documents/PCoIPSoftClientSDK/Examples/broker_client_example/bin This file supplies session input values.

About the login_info.txt File

The Broker Client API example uses a local text file to provide session input values. The following is a sample login_info.txt file:

my-machine.mydomain.com mydomain myuser "mypassword" desktop-resource

In the example above:

  • The FQDN of the host server is my-machine.mydomain.com
  • The domain is mydomain
  • The user is myuser
  • The password is mypassword
  • The host name is desktop-resource

Remote sessions established by the Broker Client Example are exactly the same as sessions established using the Anyware Software Client, except that the input values are provided by login_info.txt instead of the client’s user interface.

Passing Arguments Securely via Standard Input

The SDK contains an example that demonstrates how parameters are passed to the the pcoip-client process via standard input within a C++ program.

The following is an example of writing to the stdin stream of the Anyware Client:

/usr/lib/x86_64-linux-gnu/pcoip-client/examples/broker_client_example/main.cpp

The implementation of the process abstraction used to accomplish this is available in the following file:

/usr/lib/x86_64-linux-gnu/pcoip-client/examples/broker_client_example/process_posix.cpp

Note: Additional Information

For more information related to the usage of the --ask-extra-args-as-json parameter, see "Securely Passing Parameters via the Command Line" in the Anyware Client guide.