mobile-websocket-example icon indicating copy to clipboard operation
mobile-websocket-example copied to clipboard

refuses handshake

Open rajendrabohra opened this issue 11 years ago • 8 comments

Hello, I am trying to implement android client using this example. I have replaced the "ws://websockethost:8080" with my chat server url, But I am getting 07-24 12:28:06.208: I/Websocket(18294): Closed draft org.java_websocket.drafts.Draft_10@42e49300 refuses handshake error.

My chat server url is working fine with browser client. Please help.

rajendrabohra avatar Jul 24 '14 07:07 rajendrabohra

Same here. Out-of-the-box, I see: WebSocket connection to 'ws://localhost:8080/' failed: Connection closed before receiving a handshake response client.js:2

And the corresponding source code line: ws = new WebSocket("ws://" + location.hostname + ":8080/");

Interestingly enough, this problem presents itself in Chrome (38.0.2125.122), but not in Firefox (33.0).

jas7553 avatar Nov 15 '14 06:11 jas7553

same problem,just the same code and i connected to my own websocket server which is fine

fkaking avatar Dec 18 '15 09:12 fkaking

i have the same problem

warjiang avatar Mar 28 '16 13:03 warjiang

I got - refuses handshake Draft 17 , false - then changed the code as below: SSLContext sslContext = null; try { sslContext = SSLContext.getDefault(); } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block e.printStackTrace(); } setWebSocketFactory(new DefaultSSLWebSocketClientFactory(sslContext));

Draft_17. I get : closed connection -1 , , true. Any help here. This happens during socket creation. I know this very old thread. But now i am in this stage only.

prakashkolandaivelu avatar Jun 17 '16 18:06 prakashkolandaivelu

same problem org.java_websocket.drafts.Draft_10@420581d8 refuses handshake

milano95a avatar Apr 27 '17 17:04 milano95a

I have the same issue CHAT: Closed draft org.java_websocket.drafts.Draft_6455@a52e28e refuses handshake

Thanks in advance, Vamsi

Vamsi7591 avatar Jul 21 '17 09:07 Vamsi7591

Even I have same issues draft org.java_websocket.drafts.Draft_10@2fdc18cd refuses handshake

ghost avatar Nov 03 '17 12:11 ghost

i have the same problem,hao to solve it

jcken avatar Aug 14 '19 04:08 jcken