throw new IllegalArgumentException
("Target scheme (" + schm.getName() +
") must have layered socket factory.");
}
LayeredSchemeSocketFactory lsf = (LayeredSchemeSocketFactory) schm.getSchemeSocketFactory();
Socket sock;
try {
sock = lsf.createLayeredSocket(
conn.getSocket(), target.getHostName(), target.getPort(), true);
} catch (ConnectException ex) {
throw new HttpHostConnectException(target, ex);
}
prepareSocket(sock, context, params);
conn.update(sock, target, lsf.isSecure(sock), params);
}