You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A WebSocket server by itself doesn't do anything except establish socket
@@ -65,12 +65,25 @@ connections though HTTP. After that it's up to **your** subclass to add purpose.
65
65
Writing your own WebSocket Client
66
66
---------------------------------
67
67
68
-
The `net.tootallnate.websocket.WebSocketClient` abstract class can connect to
68
+
The `org.java_websocket.server.WebSocketClient` abstract class can connect to
69
69
valid WebSocket servers. The constructor expects a valid `ws://` URI to
70
70
connect to. Important events `onOpen`, `onClose`, `onMessage` and `onIOError`
71
71
get fired throughout the life of the WebSocketClient, and must be implemented
72
72
in **your** subclass.
73
73
74
+
WSS Support
75
+
---------------------------------
76
+
77
+
WSS support is still VERY young ( https://github.com/TooTallNate/Java-WebSocket/pull/101 ).
78
+
The only way to use wss is currently the one shown in the example. That also means that you have to switch between ws and wss.
79
+
You can not have both at the same time on the same port.
80
+
81
+
If you do not have a valid certificate in place then you will have to create a self signed one.
82
+
Browsers will simply refuse the connection in case of a bad certificate and will not ask the user to accept it.
83
+
So the first step will be to make a browser to accept your self signed certificate. ( https://bugzilla.mozilla.org/show_bug.cgi?id=594502 )
84
+
If the websocket server url is `wss://localhost:8000` visit the url `htts://localhost:8000` with your browser. The browser will recognize the handshake and allow you to accept the certificate.
85
+
86
+
I ( @Davidiusdadi ) would be glad if you would give some feedback whether wss is working fine for you or not.
0 commit comments