bump engine.io-client, add setDefaultHostnameVerifier method
This commit is contained in:
@@ -3,6 +3,7 @@ package com.github.nkzawa.socketio.client;
|
||||
|
||||
import com.github.nkzawa.socketio.parser.Parser;
|
||||
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URI;
|
||||
@@ -27,6 +28,10 @@ public class IO {
|
||||
Manager.defaultSSLContext = sslContext;
|
||||
}
|
||||
|
||||
public static void setDefaultHostnameVerifier(HostnameVerifier hostnameVerifier) {
|
||||
Manager.defaultHostnameVerifier = hostnameVerifier;
|
||||
}
|
||||
|
||||
private IO() {}
|
||||
|
||||
public static Socket socket(String uri) throws URISyntaxException {
|
||||
|
||||
@@ -6,10 +6,11 @@ import com.github.nkzawa.socketio.parser.Packet;
|
||||
import com.github.nkzawa.socketio.parser.Parser;
|
||||
import com.github.nkzawa.thread.EventThread;
|
||||
|
||||
import javax.net.ssl.HostnameVerifier;
|
||||
import javax.net.ssl.SSLContext;
|
||||
import java.net.URI;
|
||||
import java.util.*;
|
||||
import java.util.concurrent.*;
|
||||
import java.util.concurrent.ConcurrentHashMap;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
@@ -70,6 +71,7 @@ public class Manager extends Emitter {
|
||||
public static final String EVENT_TRANSPORT = Engine.EVENT_TRANSPORT;
|
||||
|
||||
/*package*/ static SSLContext defaultSSLContext;
|
||||
/*package*/ static HostnameVerifier defaultHostnameVerifier;
|
||||
|
||||
/*package*/ ReadyState readyState = null;
|
||||
|
||||
@@ -120,6 +122,9 @@ public class Manager extends Emitter {
|
||||
if (opts.sslContext == null) {
|
||||
opts.sslContext = defaultSSLContext;
|
||||
}
|
||||
if (opts.hostnameVerifier == null) {
|
||||
opts.hostnameVerifier = defaultHostnameVerifier;
|
||||
}
|
||||
this.opts = opts;
|
||||
this.nsps = new ConcurrentHashMap<String, Socket>();
|
||||
this.subs = new LinkedList<On.Handle>();
|
||||
|
||||
Reference in New Issue
Block a user