We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e1877d6 commit b7e9b76Copy full SHA for b7e9b76
src/com/codebutler/android_websockets/SocketIOClient.java
@@ -25,6 +25,8 @@ public class SocketIOClient {
25
public static interface Handler {
26
public void onConnect();
27
28
+ public void onConnectToEndpoint(String endpoint);
29
+
30
public void on(String event, JSONArray arguments);
31
32
public void onDisconnect(int code, String reason);
@@ -142,7 +144,11 @@ public void onMessage(String message) {
142
144
switch (code) {
143
145
case 1:
146
// connect
- mHandler.onConnect();
147
+ if (!TextUtils.isEmpty(parts[2])) {
148
+ mHandler.onConnectToEndpoint(parts[2]);
149
+ } else {
150
+ mHandler.onConnect();
151
+ }
152
break;
153
case 2:
154
// heartbeat
0 commit comments