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 in the bin/ folder, which contains the broker_client_example.exe file. The is the sample command-line client executable. The other relevant file is login_info.txt, which is a local text file that supplies session input values. login_info.txt is available at: examples\broker_client_example.
About the login_info.txt File
The Broker Client API example uses login_info.txt, which is a local text file that provides 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.