* @exception IOException if an I/O error occurs during socket creation.
*/
public java.net.Socket createSocket(String host, int port)
throws IOException
{
SSLSocketFactory factory = (SSLSocketFactory) SSLSocketFactory.getDefault();
SSLSocket socket = (SSLSocket) factory.createSocket(host, port);
socket.addHandshakeCompletedListener(this);
socket.setWantClientAuth(wantsClientAuth);
socket.setNeedClientAuth(needsClientAuth);
log.debug("createSocket, host="+host+", port="+port
+",needsClientAuth="+needsClientAuth+", wantsClientAuth="+wantsClientAuth);