-
Notifications
You must be signed in to change notification settings - Fork 98
Open
Description
Hi there,
I connect socket and it throws an exception with the message sendto failed: EPIPE (Broken pipe) after 5 seconds (with master version).
When I use v0.2.0 version, the socket is closed with code 1011. I've seen the meaning of this code
1011 indicates that a server is terminating the connection because
it encountered an unexpected condition that prevented it from
fulfilling the request.
I'm following the README sample to create the connection. What could be wrong? We've tested the socket server with iOS and it works.
final String SOCKET_URL_TEMPLATE = "ws://socket.test.com/socket/websocket?token=%s&vsn=2.0.0";
String url = String.format(SOCKET_URL_TEMPLATE, "token_xpto");
socket = new Socket(url);
socket.onOpen(new ISocketOpenCallback() {
@Override
public void onOpen() {
Log.d("[SOCKET_TEST]", "socket opened");
// this part connects and join the channel, but the error occurs even without this part
// simpleChannelConnection();
}
});
socket.onClose(new ISocketCloseCallback() {
@Override
public void onClose() {
Log.d("[SOCKET_TEST]", "socket closed");
}
});
socket.onError(new IErrorCallback() {
@Override
public void onError(String s) {
Log.d("[SOCKET_TEST]", "socket error - " + s);
}
});
socket.onMessage(new IMessageCallback() {
@Override
public void onMessage(Envelope envelope) {
Log.d("[SOCKET_TEST]", "socket message - " + envelope.toString());
}
});
socket.reconectOnFailure(false);
socket.connect();
Thank you.
Luis
Metadata
Metadata
Assignees
Labels
No labels