The class javax.net.ssl.SSLSocketFactory defines a method createSocket(Socket s, String host, int port, boolean autoClose), which returns an instance of SSLSocket.
I'm trying to understand this method, so my question is: why does the method take a host parameter? Shouldn't the host be read from the plain socket's underlying getInetAddress().getHostName(), or am I missing something?