Pusher Channels
APIHosted WebSocket pub/sub for live updates, presence and chat features
- Erişim
- App key and secret
Hakkında
Hosted realtime messaging: servers trigger events through an HTTP API or server SDKs, and browsers and phones receive them over WebSockets on public, private, encrypted and presence channels. Messages pass through and are not stored. The free Sandbox plan allows 200,000 messages a day.
Neler yapabilirsin
- Push live dashboard, score or location updates to browsers and phones
- Show who is online in a document, game or chat with presence channels
- Build chat with typing indicators and read receipts on private channels
Başlarken
- Create a Channels app and copy its app_id, key, secret and cluster
- Subscribe to a channel in the browser with pusher-js
- Trigger events on that channel from a server library
Örnek kod
// Server: npm install pusher
var Pusher = require("pusher");
var pusher = new Pusher({
appId: "APP_ID",
key: "APP_KEY",
secret: "APP_SECRET",
cluster: "APP_CLUSTER",
});
pusher.trigger("my-channel", "my-event", { message: "hello world" });
// Browser: <script src="https://js.pusher.com/8.3.0/pusher.min.js"></script>
var pusher = new Pusher("APP_KEY", { cluster: "APP_CLUSTER" });
var channel = pusher.subscribe("my-channel");
channel.bind("my-event", (data) => { console.log(data); });Ayrıntılar
- Barındırma
- Hazır hizmet (bulut)
- Kullanılabildiği yerler
- Tüm dünya
- Resmi SDK'lar
- JavaScript/TypeScript, Python, Ruby, PHP, Go, Java, C#, Swift, Dart
- MCP sunucusu
- Yok
- Entegrasyonlar
- Unity