We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I got - closed connection -1 , draft org.java_websocket.drafts.Draft_17@75599672 refuses handshake , false - then changed the code as below: Socket creation coode webClient = new APICWebClient(new URI(getWebSocketUrl(currentApic.IPAddress, port)), new Draft_17()); webClient.connect();
Constructor: public APICWebClient(URI serverURI, Draft draft) { super(serverURI, draft);
SSLContext sslContext = null; try { sslContext = SSLContext.getDefault(); } catch (NoSuchAlgorithmException e) { // TODO Auto-generated catch block e.printStackTrace(); } setWebSocketFactory(new DefaultSSLWebSocketClientFactory(sslContext)); logger.info("Socket object created"); }
Draft_17. I get : closed connection -1 , , true. Any help here. This happens during socket creation.
The text was updated successfully, but these errors were encountered:
Facing same issue for WSS.. tried setting SSL context but still same issue
Sorry, something went wrong.
super(serverURI, draft); SSLContext sslContext; try { sslContext = SSLContext.getInstance("SSL"); // set up a TrustManager that trusts everything sslContext.init(null, new TrustManager[] { new X509TrustManager() { public X509Certificate[] getAcceptedIssuers() { logger.debug("getAcceptedIssuers ============="); return null; } public void checkClientTrusted(X509Certificate[] certs, String authType) { logger.debug("checkClientTrusted ============="); } public void checkServerTrusted(X509Certificate[] certs, String authType) { logger.debug("checkServerTrusted ============="); } } }, new SecureRandom()); this.setWebSocketFactory(new DefaultSSLWebSocketClientFactory(sslContext)); this.messageHandlerList = messageHandlerList; } catch (Exception e) { logger.error("Error while creating the Socket object {}"); } logger.debug("Socket object created");
I changed the Constructor something like this to make it work.
No branches or pull requests
I got - closed connection -1 , draft org.java_websocket.drafts.Draft_17@75599672 refuses handshake , false - then changed the code as below:
Socket creation coode
webClient = new APICWebClient(new URI(getWebSocketUrl(currentApic.IPAddress, port)), new Draft_17());
webClient.connect();
Constructor:
public APICWebClient(URI serverURI, Draft draft) {
super(serverURI, draft);
Draft_17. I get : closed connection -1 , , true. Any help here. This happens during socket creation.
The text was updated successfully, but these errors were encountered: