update README

This commit is contained in:
nkzawa
2015-12-18 14:26:38 +09:00
parent 1e89fed58f
commit 18234858ba

View File

@@ -96,10 +96,12 @@ Use custom SSL settings:
```java
// default SSLContext for all sockets
Socket.setDefaultSSLContext(mySSLContext);
Socket.setDefaultHostnameVerifier(myHostnameVerifier);
// set as an option
opts = new Socket.Options();
opts.sslContext = mySSLContext;
opts.hostnameVerifier = myHostnameVerifier;
socket = new Socket(opts);
```