Skip to content
This repository was archived by the owner on Nov 2, 2020. It is now read-only.

Commit 2f78ae8

Browse files
committed
Updated README
1 parent 58f5de9 commit 2f78ae8

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,13 +130,16 @@ Channel channel = clusterWS.subscribe("channel name").watch(new Channel.ChannelL
130130
}
131131
}).publish(data);
132132

133-
134133
/**
135134
You can get channel by channel name only if you were subscribed before
136135
*/
137136

138-
clusterWS.getChannelByName('channel name').publish(data);
139-
clusterWS.getChannelByName('channel name').unsubscribe();
137+
clusterWS.getChannelByName("channel name");
138+
139+
/**
140+
You can get all channels as an array by using getChannels method
141+
*/
142+
clusterWS.getChannels();
140143
```
141144

142145
**To make sure that user is connected to the server before subscribing, do it on `onConnected` event or on any other events which you emit from the server, otherwise subscription may not work properly**

0 commit comments

Comments
 (0)