Updated on 2026-08-14

This commit is contained in:
Tangem 2019-05-22 10:29:40 +03:00
parent 25e76dbb18
commit 1deb84b983
5 changed files with 21 additions and 10 deletions

View file

@ -317,15 +317,16 @@ public class ServerApiElectrum {
// install the all-trusting host verifier
HttpsURLConnection.setDefaultHostnameVerifier(allHostsValid);
SSLSocket sslSocket;
Socket sslSocket = new Socket();
List<ElectrumRequest> result = new ArrayList<>();
Collections.addAll(result, electrumRequest);
try {
Log.i(TAG, host + " " + port);
sslSocket = (SSLSocket) sf.createSocket(host, port);
sslSocket.connect(new InetSocketAddress(host,port), 3000);
sslSocket.setSoTimeout(3000);
sslSocket = sf.createSocket(sslSocket, host, port, true);
try {
OutputStream os = sslSocket.getOutputStream();
OutputStreamWriter out = new OutputStreamWriter(os, "UTF-8");