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 installed in the following location: /usr/bin
It contains the broker_client_example, which is the sample command-line client executable.
The other relevant file is the login_info.txt file, which is located here: /usr/lib/x86_64-linux-gnu/pcoip-client/examples/broker_client_example. 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.
Parameters for Smart Card Authentication
The login_info.txt file also supports additional parameters for smart card authentication.
The following is a sample login_info.txt file for smart card authentication:
my-machine.mydomain.com 0 "Reader name" 123456 desktop-resource
In the example above:
The FQDN of the host server is my-machine.mydomain.com
The certificate index in the card is 0
The Smart Card Reader name is Reader name
The pin is 123456
The host name is desktop-resource
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.