PusherEventServicewe first need to request information from the platform related to its notification settings. For the Pusher service, this will be the cluster our service needs to connect to, the key it needs to connect to, as well as any other options the platform has specified.
GetPlatformrequest that is shared between and usable by both the
PlayerClient, allowing us to use either one for this step. When creating the request we need to specify that we want our response with the platform's notification settings. This can be done so with a chaining method as shown in the example below:
Platformmodel, which represents the type of the same name in the platform's API.
Platformmodel instance from the previous step into its constructor.
IConnectionEventListenerinterface which may be passed to the service through any of the
start()methods which accept it as an argument. The example code block below shows how this listener may be set with an anonymous class.
std::functionfrom the standard library as our handler for notifications raised by the service. The example code block below shows how these handlers may be used with lambda expressions.