Closed 1371030 closed 7 years ago
Hi @1371030 if you are using the WebSocketEcho.java
example only changing the ws address the behaviour is as expected.
This sample send 3 messages and then close the connection as you can see here.
The close frame tell to the server that the client don't want to keep the connection open, and the server closes the connection on its side.
The 1005 code that you received is a code on the okhttp3 client, indicating that the server closed the connection without specifying a reason (check here). Which is totally OK on this case, since the client already know the reason it asked to close the connection.
thanks,nginx-push-stream-module very nice!
use okhttp3 https://github.com/square/okhttp/blob/master/samples/guide/src/main/java/okhttp3/recipes/WebSocketEcho.java
use this sample. change ws to ws://127.0.0.1 wait 10SECONDS, websocket return 1005