sgcWebSockets Pusher client has been improved on 4.5.3 version, the HTTP API has been implemented allowing to trigger events, get users of a channel and get a list of channels.
Pusher is a hosted WebSockets solution for building powerful realtime interactive apps. The sgcWebSockets client allows to use the following pusher channels:
- Public Channels: can be subscribed to by anyone who knows their name.
- Private Channels: they introduce a mechanism which lets your server control access to the data you are broadcasting.
- Presence Channels: are an extension of private channels. They let you 'register' user information on subscription, and let other members of the channel know who's online
Pusher HTTP API
The following REST API functions have been implemented.
- TriggerEvent: triggers a new event on the specified channel.
- GetChannels: provide a list of all channels active.
- GetChannel: provide information of a channel.
- GetUsers: provide a list of all users connected to a channel.
Find below a video which shows how a client subscribes to a Public Channel and another client calls the method TriggerEvent to trigger a new event on this public channel.