Why is the
Socket mSocket = IO.socket("wss://engine_url:443/path_to_script);
returns the URISyntaxException: Unknown protocol: wss: exception
Any Idea why? Any help would be appreciated
Just use http://
or https://
. They are actually the same with ws://
and wss://
The SocketIO Java library documentation provides sample code to connection on a secure websocket.
https://github.com/socketio/socket.io-client-java
Other knowledge required to process their code sample. https://square.github.io/okhttp/4.x/okhttp/okhttp3/-ok-http-client/-builder/
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.