socket = IO.socket("http://gureuso.me");
socket.on(Socket.EVENT_CONNECT, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.i(TAG, "connect");
socket.emit("abc", "client-android");
}
}).on("abc", new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.i(TAG, args[0].toString());
}
}).on(Socket.EVENT_DISCONNECT, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.i(TAG, Arrays.toString(args));
}
}).on(Socket.EVENT_CONNECT_ERROR, new Emitter.Listener() {
@Override
public void call(Object... args) {
Log.i(TAG, Arrays.toString(args));
}
});
Log.i(TAG, "connection");
socket.connect();
server error
socket.io:server incoming connection with id KMeDyT5ZUPc3wKB9AAAs +5s
socket.io:client no namespace joined yet, close the client +5s
socket.io:client client close with reason ping timeout +170ms
server
client
server error
client error
I don't know why client close with reason ping timeout. I used proxy 3001 to 80.