PusherEventService
we 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.GetPlatform
request that is shared between and usable by both the ProjectClient
and 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:Platform
model, which represents the type of the same name in the platform's API.Platform
model instance from the previous step into its constructor.PusherEventService
runs the shutdown()
member-function as well.IConnectionEventListener
interface 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.IConnectionEventListener
interface utilizes default methods, which enables us to override only the methods we wish to implement ourselves and ignore the rest.std::function
from 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.