A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://pusher.com/docs/client_api_guide/client_private_channels below:

Pusher Channels Docs | How to build private channels

Private channels

Private channels should be used when access to the channel needs to be restricted in some way. In order for a user to subscribe to a private channel permission must be authorized. The authorization occurs via a HTTP Request to a configurable authorization url when the subscribe method is called with a private- channel name. In the JavaScript client library the HTTP Request is executed via AJAX (see Authorizing Users).

Subscribe

When a subscription takes place the user authorization process will be triggered.

var privateChannel = pusher.subscribe("private-my-channel");
let privateChannel = pusher.subscribe("private-my-channel")
PrivateChannel channel = pusher.subscribePrivate("private-my-channel");
privateChannelNameString Required

The name of the channel to subscribe to. Since it is a private channel the name must be prefixed with private-

Returns

A Channel object which events can be bound to. See binding to events for more information on the Channel object.

channelNameString Required

The name of the channel to subscribe to. Since it is a private channel the name must be prefixed with private-

Returns

A PusherChannel object which events can be bound to. See binding to events.

channelNameString Required

The name of the channel to subscribe to. Since it is a private channel the name must be prefixed with private-

Returns

A PrivateChannel object which events can be bound to. See binding to events.

Unsubscribe

See unsubscribing from channels

Events

See binding to events for general information about how to bind to events on a channel object.

You can bind to the following pusher: events on a private channel:


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4