Using the Session Client API¶
Use of the Session Client C++ API is demonstrated in /usr/lib/x86_64-linux-gnu/pcoip-client/examples/pcoip-client_example/pcoip-client_main.cpp. It includes the steps outlined in the diagram below:
PCoIP Session Client API Sequence Diagram
Each of these steps is used by the Session Client API, with a comment identifying the step number:
- Setup Environment and Implementations: Os specifc initialization. Instantiate a Configuration Provider object.
- Parse Command Line: Define and parse supported command line parameters.
- Setup Session Options: Validate the options passed via the command line and setup the Configuration Provider object accordingly.
- Setup Session Connection Information: Pack the session parameter, received via the command line, into the structures required by the API.
- Get Session Instance and Run:: Obtain the main session object, set the Configuration Provider and run the session. The run call blocks until the session is terminated.
- Post-Session Clean-up: Performs any post-session shutdown processing.