Closed putheng closed 4 years ago
You can subscribe to a private channel to listen to events, but we haven't yet added support to send events.
Hi thank you for clarifying, But how to listen to a private channel? I can not find method in the example code. I see only Pusher.subscribe() So which method would you prefer?
Again thank you to this package help me complete a project for a client easily and on time Thank you so much.
When calling Pusher.init
send PusherOptions
with PusherAuth
setup for authentication. This is required for private channels.
Then just call Pusher.subscribe
as normal with the channel name as private-mychannel
.
See the official Java docs for more info: https://github.com/pusher/pusher-websocket-java#private-channels
@putheng are you stilling having issues with private channels or did my comment help you solve the issue?
No, I solved it. Thank you
Hi, How to broadcast to private channel?